3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo($a) { bar($a++); } function bar($a) { echo '$a = '.$a."\n"; echo (new Exception)->getTraceAsString(); } foo(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KQaoc
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'foo'
          1        SEND_VAL                                                     1
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KQaoc
function name:  foo
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
          1        INIT_FCALL_BY_NAME                                           'bar'
          2        POST_INC                                             ~1      !0
          3        SEND_VAL_EX                                                  ~1
          4        DO_FCALL                                          0          
          5      > RETURN                                                       null

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KQaoc
function name:  bar
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        CONCAT                                               ~1      '%24a+%3D+', !0
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
          4        NEW                                                  $3      'Exception'
          5        DO_FCALL                                          0          
          6        INIT_METHOD_CALL                                             $3, 'getTraceAsString'
          7        DO_FCALL                                          0  $5      
          8        ECHO                                                         $5
          9      > RETURN                                                       null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
231.04 ms | 2436 KiB | 9 Q