note 115942 added to function.debug-backtrace
| From: | anoam at yandex dot ru | Date: | Fri, 17 Oct 2014 08:12:05 +0000 |
| Subject: | note 115942 added to function.debug-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200669@lists.php.net to get a copy of this message | ||
It works a little bit different with resources in different PHP versions.
For example:
function foo($bar)
{
return debug_backtrace();
}
$resource = fopen(__FILE__, 'r');
$backtrace = foo($resource);
echo "when resource is opened: " . gettype($backtrace[0]['args'][0]) .
"\n";
fclose($resource);
echo "when resource is closed: " . gettype($backtrace[0]['args'][0]) .
"\n";
With 5.3.10 I got:
when resource is opened: resource
when resource is closed: resource
With 5.5.9:
when resource is opened: resource
when resource is closed: unknown type
Be carefull.
----
Server IP: 195.54.192.44
Probable Submitter: 94.181.191.107
----
Manual Page -- http://php.net/manual/en/function.debug-backtrace.php
Edit -- https://master.php.net/note/edit/115942
Del: integrated -- https://master.php.net/note/delete/115942/integrated
Del: useless -- https://master.php.net/note/delete/115942/useless
Del: bad code -- https://master.php.net/note/delete/115942/bad+code
Del: spam -- https://master.php.net/note/delete/115942/spam
Del: non-english -- https://master.php.net/note/delete/115942/non-english
Del: in docs -- https://master.php.net/note/delete/115942/in+docs
Del: other reasons-- https://master.php.net/note/delete/115942
Reject -- https://master.php.net/note/reject/115942
Search -- https://master.php.net/manage/user-notes.php