3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { static $a; return ++$a; } var_dump(foo() + foo() + foo() + foo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZDZmL
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $0      
          3        INIT_FCALL                                               'foo'
          4        DO_FCALL                                      0  $1      
          5        ADD                                              ~2      $0, $1
          6        INIT_FCALL                                               'foo'
          7        DO_FCALL                                      0  $3      
          8        ADD                                              ~4      ~2, $3
          9        INIT_FCALL                                               'foo'
         10        DO_FCALL                                      0  $5      
         11        ADD                                              ~6      ~4, $5
         12        SEND_VAL                                                 ~6
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.59 ms | 1397 KiB | 19 Q