3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Vendor_Foo { const MY_CONST = 'core'; } class Foo { public static function __callStatic($name, $arguments) { return $name; } public function __get($name) { return Vendor_Foo::$name; } } var_dump(Foo::MY_CONST);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QPk4d
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CLASS_CONSTANT                             ~0      'Foo', 'MY_CONST'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   1

Class Vendor_Foo: [no user functions]
Class Foo:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QPk4d
function name:  __callStatic
number of ops:  4
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2      > RETURN                                                   !0
   13     3*     > RETURN                                                   null

End of function __callstatic

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QPk4d
function name:  __get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_STATIC_PROP_R          unknown             ~1      'name'
          2      > RETURN                                                   ~1
   19     3*     > RETURN                                                   null

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.75 ms | 1395 KiB | 15 Q