3v4l.org

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

End of function test

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.45 ms | 1386 KiB | 15 Q