3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() { $this->wut = 'bar'; } public function __get($key) { return '__get'; } } class Bar { public $wut; public function __construct() { $this->wut = 'bar'; } public function __get($key) { return '__get'; } } class Baz { public function __construct() { $this->wut = 'baz'; } } $foo = new Foo; $bar = new Bar; $baz = new Baz; var_dump([$foo->wut, $bar->wut, $baz->wut]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H21IM
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   22     3        NEW                                              $6      'Bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
   23     6        NEW                                              $9      'Baz'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $9
   25     9        INIT_FCALL                                               'var_dump'
         10        FETCH_OBJ_R                                      ~12     !0, 'wut'
         11        INIT_ARRAY                                       ~13     ~12
         12        FETCH_OBJ_R                                      ~14     !1, 'wut'
         13        ADD_ARRAY_ELEMENT                                ~13     ~14
         14        FETCH_OBJ_R                                      ~15     !2, 'wut'
         15        ADD_ARRAY_ELEMENT                                ~13     ~15
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

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

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H21IM
function name:  __get
number of ops:  3
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   '__get'
          2*     > RETURN                                                   null

End of function __get

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/H21IM
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN_OBJ                                               'wut'
          1        OP_DATA                                                  'bar'
          2      > RETURN                                                   null

End of function __construct

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H21IM
function name:  __get
number of ops:  3
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1      > RETURN                                                   '__get'
          2*     > RETURN                                                   null

End of function __get

End of class Bar.

Class Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H21IM
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN_OBJ                                               'wut'
          1        OP_DATA                                                  'baz'
          2      > RETURN                                                   null

End of function __construct

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.57 ms | 1392 KiB | 15 Q