3v4l.org

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

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

End of function test

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.98 ms | 1386 KiB | 15 Q