3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public object $this; public function __construct() { $this->this = $this; } } $f = new Foo(); var_dump($f); $f->this = new stdClass(); var_dump($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQGmC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   14     6        NEW                                              $6      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN_OBJ                                               !0, 'this'
          9        OP_DATA                                                  $6
   15    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hQGmC
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                                               'this'
          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:
152.14 ms | 1009 KiB | 14 Q