3v4l.org

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

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

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

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.79 ms | 1395 KiB | 15 Q