3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. Position 1 = -2
filename:       /in/ALHoL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  12     1        NEW                                              $2      :-6
         2        SEND_VAL_EX                                              10
         3        DO_FCALL                                      0          
         4        ASSIGN                                                   !0, $2
  13     5        INIT_FCALL                                               'var_dump'
         6        SEND_VAR                                                 !0
         7        DO_ICALL                                                 
         8      > RETURN                                                   1

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

End of function test

End of class a.

Generated using Vulcan Logic Dumper, using php 7.2.0