3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** * An indentifier * @var string */ private $name; /** * A reference to another Foo object * @var Foo */ private $link; public function __construct($name) { $this->name = $name; } public function setLink(Foo $link){ $this->link = $link; } } // create two Foo objects: $foo = new Foo('Foo 1'); $bar = new Foo('Foo 2'); echo $foo->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TbvOP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $2      'Foo'
          1        SEND_VAL_EX                                              'Foo+1'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   28     4        NEW                                              $5      'Foo'
          5        SEND_VAL_EX                                              'Foo+2'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   30     8        FETCH_OBJ_R                                      ~8      !0, 'name'
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

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

End of function __construct

Function setlink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TbvOP
function name:  setLink
number of ops:  4
compiled vars:  !0 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'link'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function setlink

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.82 ms | 1394 KiB | 13 Q