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(); $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/2vjmn
function name:  (null)
number of ops:  12
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
   13     3        INIT_FCALL                                               'test_func'
          4        DO_FCALL                                      0          
   14     5        INIT_FCALL_BY_NAME                                       'xhprof_disable'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   16     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   17    11      > 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/2vjmn
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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.47 ms | 1397 KiB | 16 Q