3v4l.org

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

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o6AI8
function name:  test
number of ops:  5
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        INIT_METHOD_CALL                                         !0, 'append'
          2        SEND_VAL_EX                                              4
          3        DO_FCALL                                      0          
    9     4      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.86 ms | 1397 KiB | 16 Q