3v4l.org

run code in 300+ PHP versions simultaneously
<?php class b{ public $o; public function __construct(){ $this->o = (object)array('id'=>12); } } class foo { private $b; public function __construct(){ $this->b = new b(); } public function bar(){ return $this->b; } } $f = new foo(); if (isset($f->bar()->id)){ echo $f->bar()->id; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/uc9VI
function name:  (null)
number of ops:  12
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0  $4      
          5        ISSET_ISEMPTY_PROP_OBJ                                   $4, 'id'
          6      > JMPZ                                                     ~5, ->11
   27     7    >   INIT_METHOD_CALL                                         !0, 'bar'
          8        DO_FCALL                                      0  $6      
          9        FETCH_OBJ_R                                      ~7      $6, 'id'
         10        ECHO                                                     ~7
   28    11    > > RETURN                                                   1

Class b:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uc9VI
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                                               'o'
          2        OP_DATA                                                  ~1
    7     3      > RETURN                                                   null

End of function __construct

End of class b.

Class foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uc9VI
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'b'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'b'
          3        OP_DATA                                                  $1
   15     4      > 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/uc9VI
function name:  bar
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      'b'
          1      > RETURN                                                   ~0
   19     2*     > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.46 ms | 1395 KiB | 13 Q