3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,3,4); $b = $a; $c = &$a; $b[] = 'f'; $c[] = 'f'; echo 'a='.print_r($a, true)."\n"; echo 'b='.print_r($b, true)."\n"; echo 'c='.print_r($c, true)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZD0OB
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, !0
    5     2        ASSIGN_REF                                               !2, !0
    7     3        ASSIGN_DIM                                               !1
          4        OP_DATA                                                  'f'
    8     5        ASSIGN_DIM                                               !2
          6        OP_DATA                                                  'f'
   10     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $8      
         11        CONCAT                                           ~9      'a%3D', $8
         12        CONCAT                                           ~10     ~9, '%0A'
         13        ECHO                                                     ~10
   11    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        CONCAT                                           ~12     'b%3D', $11
         19        CONCAT                                           ~13     ~12, '%0A'
         20        ECHO                                                     ~13
   12    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !2
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $14     
         25        CONCAT                                           ~15     'c%3D', $14
         26        CONCAT                                           ~16     ~15, '%0A'
         27        ECHO                                                     ~16
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.19 ms | 1395 KiB | 15 Q