3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,3); foreach($a AS &$y) { $y = $y*2; } echo $y , PHP_EOL; foreach($a AS $y) { echo $y.', '; } echo $y , PHP_EOL; foreach($a AS $x) { echo $x.', '; } echo $x , PHP_EOL;
based on vTIUd
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
Jump found. Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
Jump found. Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
Jump found. Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
Jump found. Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
Jump found. Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 14
Jump found. Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
Jump found. Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
Jump found. Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 22
Jump found. Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/Srh3B
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $y, !2 = $x
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, <array>
   5     1      > FE_RESET_RW                                      $4      !0, ->6
         2    > > FE_FETCH_RW                                              $4, !1, ->6
   6     3    >   MUL                                              ~5      !1, 2
         4        ASSIGN                                                   !1, ~5
         5      > JMP                                                      ->2
         6    >   FE_FREE                                                  $4
   9     7        ECHO                                                     !1
         8        ECHO                                                     '%0A'
  11     9      > FE_RESET_R                                       $7      !0, ->14
        10    > > FE_FETCH_R                                               $7, !1, ->14
  12    11    >   CONCAT                                           ~8      !1, '%2C+'
        12        ECHO                                                     ~8
        13      > JMP                                                      ->10
        14    >   FE_FREE                                                  $7
  15    15        ECHO                                                     !1
        16        ECHO                                                     '%0A'
  17    17      > FE_RESET_R                                       $9      !0, ->22
        18    > > FE_FETCH_R                                               $9, !2, ->22
  18    19    >   CONCAT                                           ~10     !2, '%2C+'
        20        ECHO                                                     ~10
        21      > JMP                                                      ->18
        22    >   FE_FREE                                                  $9
  21    23        ECHO                                                     !2
        24        ECHO                                                     '%0A'
        25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0