3v4l.org

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

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

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

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

End of function %00%7Bclosure%7D%2Fin%2FoTvaR%3A9%241

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.99 ms | 1396 KiB | 15 Q