3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $a; function __construct() { $this->a = $this; } } $foo = new Foo(); var_dump($foo, $foo->a, $foo->a->a, $foo->a->a->a->a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ogFN8
function name:  (null)
number of ops:  17
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_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        FETCH_OBJ_R                                      ~4      !0, 'a'
          6        SEND_VAL                                                 ~4
          7        FETCH_OBJ_R                                      ~5      !0, 'a'
          8        FETCH_OBJ_R                                      ~6      ~5, 'a'
          9        SEND_VAL                                                 ~6
         10        FETCH_OBJ_R                                      ~7      !0, 'a'
         11        FETCH_OBJ_R                                      ~8      ~7, 'a'
         12        FETCH_OBJ_R                                      ~9      ~8, 'a'
         13        FETCH_OBJ_R                                      ~10     ~9, 'a'
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.8 ms | 1395 KiB | 15 Q