note 78565 added to function.debug-backtrace

From: Date: Wed, 17 Oct 2007 16:35:29 +0000
Subject: note 78565 added to function.debug-backtrace
Groups: php.notes 
Request: Send a blank email to php-notes+get-131457@lists.php.net to get a copy of this message
You should probably try to avoid changing any of the items in the args array. Consider this example: ---------- function a(&$value) { echo "start a: $value\n"; b(); echo "end a: $value\n"; } function b() { echo "start b\n"; $stack = debug_backtrace(); $stack[1]['args'][0] = 'bob'; echo "end b\n"; } $mynum = 42; a($mynum); -------------- This prints: start a: 42 start b end b end a: bob ---- Server IP: 208.69.120.35 Probable Submitter: 216.16.200.106 ---- Manual Page -- http://www.php.net/manual/en/function.debug-backtrace.php Edit -- https://master.php.net/note/edit/78565 Del: integrated -- https://master.php.net/note/delete/78565/integrated Del: useless -- https://master.php.net/note/delete/78565/useless Del: bad code -- https://master.php.net/note/delete/78565/bad+code Del: spam -- https://master.php.net/note/delete/78565/spam Del: non-english -- https://master.php.net/note/delete/78565/non-english Del: in docs -- https://master.php.net/note/delete/78565/in+docs Del: other reasons-- https://master.php.net/note/delete/78565 Reject -- https://master.php.net/note/reject/78565 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#131457) next »