3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static $one; public $two; } $foo = new Foo; $one = function (){ return 'thirty'; }; 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/JLBaM
function name:  (null)
number of ops:  24
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        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJLBaM%3A8%240'
          4        ASSIGN                                                   !1, ~5
   10     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJLBaM%3A10%241'
          6        ASSIGN_STATIC_PROP                                       'one', 'Foo'
          7        OP_DATA                                                  ~8
   11     8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJLBaM%3A11%242'
          9        ASSIGN_OBJ                                               !0, 'two'
         10        OP_DATA                                                  ~10
   13    11        INIT_FCALL                                               'var_export'
         12        INIT_STATIC_METHOD_CALL                                  'Foo', !1
         13        DO_FCALL                                      0  $11     
         14        SEND_VAR                                                 $11
         15        DO_ICALL                                                 
         16        ECHO                                                     '%0A'
   14    17        INIT_FCALL                                               'var_export'
         18        INIT_METHOD_CALL                                         !0, 'two'
         19        DO_FCALL                                      0  $13     
         20        SEND_VAR                                                 $13
         21        DO_ICALL                                                 
         22        ECHO                                                     '%0A'
         23      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FJLBaM%3A8%240

Function %00%7Bclosure%7D%2Fin%2FJLBaM%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JLBaM
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%2FJLBaM%3A10%241

Function %00%7Bclosure%7D%2Fin%2FJLBaM%3A11%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JLBaM
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%2FJLBaM%3A11%242

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.43 ms | 1400 KiB | 15 Q