3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function hello() { echo "Hello !"; } } class Bar { public $apple = null; public function __construct() { $this->apple = new Foo(); } } $foo = new Bar(); $baz = $foo->apple; $baz::hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sdpHD
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   20     3        FETCH_OBJ_R                                      ~5      !0, 'apple'
          4        ASSIGN                                                   !1, ~5
   21     5        FETCH_CLASS                                   0  $7      !1
          6        INIT_STATIC_METHOD_CALL                                  $7, 'hello'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function hello

End of class Foo.

Class Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sdpHD
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'apple'
          3        OP_DATA                                                  $1
   16     4      > RETURN                                                   null

End of function __construct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.67 ms | 1394 KiB | 13 Q