note 111452 modified in function.stream-context-create by danbrown

From: Date: Mon, 04 Mar 2013 17:59:26 +0000
Subject: note 111452 modified in function.stream-context-create by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193862@lists.php.net to get a copy of this message
So when trying to troubleshoot a stream, I was able to var_dump and it came back as expected, but it turns out var_export does not work as intended. It always comes back as null. Use is_resource() <?php file_put_contents( "/tmp/debug", var_export( is_resource($stream), true ) ); ?> to get a true/false if the stream is getting made or not. --was-- So when trying to troubleshoot a stream, I was able to var_dump and it came back as expected, but it turns out var_export does not work as intended. It always comes back as null. Use is_resource() file_put_contents( "/tmp/debug", var_export( is_resource($stream), true ) ); to get a true/false if the stream is getting made or not. http://php.net/manual/en/function.stream-context-create.php

« previous php.notes (#193862) next »