3v4l.org

run code in 300+ PHP versions simultaneously
<?php $func = create_function('',' static $foo = 0; return $foo++; '); var_dump($func()); var_dump($func()); var_dump($func());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O5SXF
function name:  (null)
number of ops:  21
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'create_function'
          1        SEND_VAL_EX                                              ''
          2        SEND_VAL_EX                                              '%0A%09static+%24foo+%3D+0%3B%0A%09return+%24foo%2B%2B%3B%0A'
          3        DO_FCALL                                      0  $1      
          4        ASSIGN                                                   !0, $1
    7     5        INIT_FCALL                                               'var_dump'
          6        INIT_DYNAMIC_CALL                                        !0
          7        DO_FCALL                                      0  $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'var_dump'
         11        INIT_DYNAMIC_CALL                                        !0
         12        DO_FCALL                                      0  $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        INIT_DYNAMIC_CALL                                        !0
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.22 ms | 1399 KiB | 15 Q