3v4l.org

run code in 300+ PHP versions simultaneously
<?php xhprof_enable(); $foo = strlen("foo bar"); function test_func() { $i = 0; while ($i < 1000000) { $i += 1; } } test_func(); function recurse($x) { if ($x < 0) { return; } return recurse($x - 1); } recurse(10); $xhprof_data = xhprof_disable(); print_r($xhprof_data); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aMTA
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo, !1 = $xhprof_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'xhprof_enable'
          1        DO_FCALL                                      0          
    4     2        ASSIGN                                                   !0, 7
   12     3        INIT_FCALL                                               'test_func'
          4        DO_FCALL                                      0          
   20     5        INIT_FCALL                                               'recurse'
          6        SEND_VAL                                                 10
          7        DO_FCALL                                      0          
   21     8        INIT_FCALL_BY_NAME                                       'xhprof_disable'
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !1, $6
   23    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   24    14      > RETURN                                                   1

Function test_func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 2
Branch analysis from position: 5
Branch analysis from position: 2
filename:       /in/0aMTA
function name:  test_func
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 0
    8     1      > JMP                                                      ->3
    9     2    >   ASSIGN_OP                                     1          !0, 1
    8     3    >   IS_SMALLER                                               !0, 1000000
          4      > JMPNZ                                                    ~3, ->2
   11     5    > > RETURN                                                   null

End of function test_func

Function recurse:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0aMTA
function name:  recurse
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        IS_SMALLER                                               !0, 0
          2      > JMPZ                                                     ~1, ->4
   16     3    > > RETURN                                                   null
   18     4    >   INIT_FCALL_BY_NAME                                       'recurse'
          5        SUB                                              ~2      !0, 1
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0  $3      
          8      > RETURN                                                   $3
   19     9*     > RETURN                                                   null

End of function recurse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.63 ms | 1394 KiB | 17 Q