3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() { $this->Data = (object) ['name' => 'John']; } public function bar($property) { return $this->{$property}; } } $foo = new Foo(); print $foo->bar('Data');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tfq6O
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        SEND_VAL_EX                                              'Data'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tfq6O
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN_OBJ                                               'Data'
          2        OP_DATA                                                  ~1
    7     3      > RETURN                                                   null

End of function __construct

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Tfq6O
function name:  bar
number of ops:  4
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.68 ms | 1394 KiB | 13 Q