3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static $one; public $two; } $foo = new Foo; $one = 'one'; Foo::$one = function (){ return 'ten'; }; $foo->two = function (){ return 'twenty'; }; var_export(Foo::$one()); echo "\n"; var_export($foo->two()); echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jpZqK
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo, !1 = $one
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    8     3        ASSIGN                                                   !1, 'one'
   10     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FjpZqK%3A10%240'
          5        ASSIGN_STATIC_PROP                                       'one', 'Foo'
          6        OP_DATA                                                  ~7
   11     7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FjpZqK%3A11%241'
          8        ASSIGN_OBJ                                               !0, 'two'
          9        OP_DATA                                                  ~9
   13    10        INIT_FCALL                                               'var_export'
         11        INIT_STATIC_METHOD_CALL                                  'Foo', !1
         12        DO_FCALL                                      0  $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                                 
         15        ECHO                                                     '%0A'
   14    16        INIT_FCALL                                               'var_export'
         17        INIT_METHOD_CALL                                         !0, 'two'
         18        DO_FCALL                                      0  $12     
         19        SEND_VAR                                                 $12
         20        DO_ICALL                                                 
         21        ECHO                                                     '%0A'
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FjpZqK%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jpZqK
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   'ten'
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FjpZqK%3A10%240

Function %00%7Bclosure%7D%2Fin%2FjpZqK%3A11%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jpZqK
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   'twenty'
          1*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FjpZqK%3A11%241

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.86 ms | 1396 KiB | 15 Q