|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-26 12:00 UTC] derick@php.net
[2004-10-26 13:02 UTC] asidorov at hotbox dot ru
[2013-09-12 13:55 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
[2013-09-12 13:55 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 15:00:01 2025 UTC |
Description: ------------ The very very helpful thing would be adding trace capability to PHP to avoid writing all this annoying var_dump's and echo's. Example output is unsuitable ofcourse. It is provided just to show the idea. There may be some number of output templates (full, medium, ...). I know that there are debug_backtrace() and xDebug but those are not the requested. Thank you and best regards. Reproduce code: --------------- <?php /* ... */ // deep - deepness of tracing function calls // output - output file ##TRACE medium, deep(0), output('trace.txt') // ... for ($i=0; $i<$n; $i++) { $a += $arr1[$i]/$arr2[$i] + foo($i); } // ... ##ENDTRACE /* ... */ ?> Expected result: ---------------- trace.txt: //for ($i=0; $i<$n; $i++) { Init: $i=0; Loop: 1) 0($i) < 1($n) == TRUE //$a += $arr1[$i]/$arr2[$i+1] + foo($i); $a = -1($a) + 3($arr1[0]) / 2($arr2[1]) + 0(foo(0)) == 0.5 2) 1($i) < 1($n) == FALSE End loop. //}