3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function method() { echo 'ok'; } } class MyObject { public $property; public function __construct() { $this->property = new Foo; } } $o = new MyObject; $o->property->method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D21VO
function name:  (null)
number of ops:  7
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'MyObject'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        FETCH_OBJ_R                                      ~4      !0, 'property'
          4        INIT_METHOD_CALL                                         ~4, 'method'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function method

End of class Foo.

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

End of function __construct

End of class MyObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.98 ms | 1385 KiB | 13 Q