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(); ($foo->apple)::hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bOuJq
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        FETCH_OBJ_R                                      ~4      !0, 'apple'
          4        FETCH_CLASS                                   0  $5      ~4
          5        INIT_STATIC_METHOD_CALL                                  $5, 'hello'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Foo:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bOuJq
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/bOuJq
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:
156.06 ms | 1394 KiB | 13 Q