3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static $one = 1; static function one() { return 'one'; } static function two() { return 'two'; } } $one = 'two'; 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/HbTtR
function name:  (null)
number of ops:  13
compiled vars:  !0 = $one
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'two'
   10     1        INIT_FCALL                                               'var_export'
          2        FETCH_STATIC_PROP_R          global lock         ~2      'one'
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
          5        ECHO                                                     '%0A'
   11     6        INIT_FCALL                                               'var_export'
          7        INIT_STATIC_METHOD_CALL                                  'Foo', !0
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                                 
         11        ECHO                                                     '%0A'
         12      > RETURN                                                   1

Class Foo:
Function one:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HbTtR
function name:  one
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'one'
          1*     > RETURN                                                   null

End of function one

Function two:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HbTtR
function name:  two
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'two'
          1*     > RETURN                                                   null

End of function two

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.42 ms | 1395 KiB | 15 Q