From: sean at caedmon dot net Operating system: Linux PHP version: 4CVS-2004-05-12 (stable) PHP Bug Type: Scripting Engine problem Bug description: debug_backtrace is intermittently passing args
Description: ------------ debug_backtrace() behaves strangely when passed as a function argument. This does not happen if debug_backtrace is dereferenced (see code), nor if debug_backtrace() is the first parameter to my custom_callback function (not denoted in code) I'll be happy to provide additional details. This SEEMS like #27397 but is not a ZE2 problem (I'm using 4.3) and is NOT fixed in CVS. Thanks, S Reproduce code: --------------- <?php function doit($a, $b) { $trace = debug_backtrace(); custom_callback('dereferenced', $trace); custom_callback('direct', debug_backtrace()); } function custom_callback($traceName, $btInfo) { echo $traceName ." -- args: "; echo isset($btInfo[0]['args']) ? 'exists' : 'does not exist'; echo "\n"; } doit('a','b'); ?> Expected result: ---------------- dereferenced -- args: exists direct -- args: exists Actual result: -------------- dereferenced -- args: exists direct -- args: does not exist -- Edit bug report at http://bugs.php.net/?id=28377&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28377&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28377&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28377&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28377&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28377&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28377&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28377&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28377&r=support Expected behavior: http://bugs.php.net/fix.php?id=28377&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28377&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28377&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28377&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28377&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28377&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28377&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28377&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28377&r=float