3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rows = [ [ 'x' => 1 ] ]; foreach ( (array) $rows as &$row ) { $row['y'] = 2; } echo json_encode( $rows ) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/6TGo4
function name:  (null)
number of ops:  14
compiled vars:  !0 = $rows, !1 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        CAST                                              7  ~3      !0
          2      > FE_RESET_RW                                          $4      ~3, ->7
          3    > > FE_FETCH_RW                                                  $4, !1, ->7
    4     4    >   ASSIGN_DIM                                                   !1, 'y'
          5        OP_DATA                                                      2
    3     6      > JMP                                                          ->3
          7    >   FE_FREE                                                      $4
    6     8        INIT_FCALL                                                   'json_encode'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                             $6      
         11        CONCAT                                               ~7      $6, '%0A'
         12        ECHO                                                         ~7
    7    13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.75 ms | 1387 KiB | 14 Q