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 PHP_EOL, $y , PHP_EOL; foreach($a AS $x) { echo $x.', '; } echo PHP_EOL, $x , PHP_EOL;
based on Srh3B
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 = 19, Position 2 = 23
Branch analysis from position: 19
Jump found. Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
Jump found. Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 23
Jump found. Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/CCadi
function name:  (null)
number of ops:  28
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
  14    15        ECHO                                                     '%0A'
        16        ECHO                                                     !1
        17        ECHO                                                     '%0A'
  16    18      > FE_RESET_R                                       $9      !0, ->23
        19    > > FE_FETCH_R                                               $9, !2, ->23
  17    20    >   CONCAT                                           ~10     !2, '%2C+'
        21        ECHO                                                     ~10
        22      > JMP                                                      ->19
        23    >   FE_FREE                                                  $9
  20    24        ECHO                                                     '%0A'
        25        ECHO                                                     !2
        26        ECHO                                                     '%0A'
        27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0