3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace App; use ArrayIterator; final class PropertySameNameAsVariable { public ArrayIterator $items; public function run() { $items = ['apple']; return array_merge($this->items, $items); } } $a = new PropertySameNameAsVariable(); $a->items = new ArrayIterator([]); $a->run();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fsFR5
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   NEW                                                  $1      'App%5CPropertySameNameAsVariable'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   19     3        NEW                                                  $5      'ArrayIterator'
          4        SEND_VAL_EX                                                  <array>
          5        DO_FCALL                                          0          
          6        ASSIGN_OBJ                                                   !0, 'items'
          7        OP_DATA                                                      $5
   20     8        INIT_METHOD_CALL                                             !0, 'run'
          9        DO_FCALL                                          0          
         10      > RETURN                                                       1

Class App\PropertySameNameAsVariable:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fsFR5
function name:  run
number of ops:  9
compiled vars:  !0 = $items
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                       !0, <array>
   14     1        INIT_NS_FCALL_BY_NAME                                        'App%5Carray_merge'
          2        CHECK_FUNC_ARG                                               
          3        FETCH_OBJ_FUNC_ARG                                   $2      'items'
          4        SEND_FUNC_ARG                                                $2
          5        SEND_VAR_EX                                                  !0
          6        DO_FCALL                                          0  $3      
          7      > RETURN                                                       $3
   15     8*     > RETURN                                                       null

End of function run

End of class App\PropertySameNameAsVariable.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.87 ms | 479 KiB | 8 Q