Stream_get_contents not working after upgrade the PHP to 5.4.16

Hello Dears,
i have a PHP script , it contains stream_get_contents as below

$command= ‘show configuration system host-name;show interface descriptions’;
$handle= ssh2_exec($connection , $command);
#ini_set(‘max_execution_time’, 100); // added to reduce run time
$result= stream_get_contents($handle , 90000);

it was working fine on PHP 5.1.6
after i upgrade the PHP to 5.4.16
the stream_get_contents part is not working

can you help me please ?