3v4l.org

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

Class a:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bs8qH
function name:  test
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_THIS                                       $2      
          1        MAKE_REF                                         $3      $2
          2        ASSIGN_OBJ_REF                                           'this'
          3        OP_DATA                                                  $3
    9     4        ASSIGN_OBJ                                               'a'
          5        OP_DATA                                                  !0
   11     6      > RETURN                                                   null

End of function test

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.4 ms | 1395 KiB | 15 Q