3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function muta($bar) { $arr[0] = $this; $new = &$arr[0]; $new = $bar; } } $a = new foo; $a->muta(new stdClass); echo get_class($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HU2CV
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'muta'
          4        NEW                                              $4      'stdClass'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
   18     8        GET_CLASS                                        ~7      !0
          9        ECHO                                                     ~7
         10      > RETURN                                                   1

Class foo:
Function muta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HU2CV
function name:  muta
number of ops:  8
compiled vars:  !0 = $bar, !1 = $arr, !2 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_THIS                                       ~4      
          2        ASSIGN_DIM                                               !1, 0
          3        OP_DATA                                                  ~4
    7     4        FETCH_DIM_W                                      $5      !1, 0
          5        ASSIGN_REF                                               !2, $5
    8     6        ASSIGN                                                   !2, !0
    9     7      > RETURN                                                   null

End of function muta

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.38 ms | 1385 KiB | 13 Q