3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { bar(); } function bar() { baz(); } function baz() { boom(); } function boom() { return false; } function test($n) { for ($i = 0; $i < $n; $i++) { foo(); } } $n = 1000000; $t = microtime(true); test($n); echo (microtime(true) - $t)*1000000/$n . ' us/iteration';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hC6vm
function name:  (null)
number of ops:  17
compiled vars:  !0 = $n, !1 = $t
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  25     0  E >   QM_ASSIGN                                                !0
  26     1        INIT_FCALL                                               'microtime'
         2        SEND_VAL                                                 <true>
         3        DO_ICALL                                         $3      
         4        QM_ASSIGN                                                !1
  27     5        INIT_FCALL                                               'test'
         6        SEND_VAR                                                 !0
         7        DO_FCALL                                      0          
  28     8        INIT_FCALL                                               'microtime'
         9        SEND_VAL                                                 <true>
        10        DO_ICALL                                         $6      
        11        SUB                                              ~7      $6, !1
        12        MUL                                              ~8      ~7, 1000000
        13        DIV                                              ~9      ~8, !0
        14        CONCAT                                           ~10     ~9, '+us%2Fiteration'
        15        ASSIGN_OBJ                                               ~10
        16      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hC6vm
function name:  foo
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   INIT_FCALL_BY_NAME                                       'bar'
         1        DO_FCALL                                      0          
   5     2      > 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/hC6vm
function name:  bar
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   8     0  E >   INIT_FCALL_BY_NAME                                       'baz'
         1        DO_FCALL                                      0          
   9     2      > RETURN                                                   null

End of function bar

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hC6vm
function name:  baz
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   INIT_FCALL_BY_NAME                                       'boom'
         1        DO_FCALL                                      0          
  13     2      > RETURN                                                   null

End of function baz

Function boom:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hC6vm
function name:  boom
number of ops:  2
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  16     0  E > > RETURN                                                   <false>
  17     1*     > RETURN                                                   null

End of function boom

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/hC6vm
function name:  test
number of ops:  10
compiled vars:  !0 = $n, !1 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  19     0  E >   RECV                                             !0      
  20     1        QM_ASSIGN                                                !1
         2      > JMP                                                      ->7
  21     3    >   INIT_FCALL                                               'foo'
         4        DO_FCALL                                      0          
  20     5        POST_INC                                         ~4      !1
         6        FREE                                                     ~4
         7    >   IS_SMALLER_OR_EQUAL                              ~5      !1, !0
         8      > JMPNZ                                                    ~5, ->3
  23     9    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
13.66 ms | 416 KiB | 7 Q