3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 2, 3]; echo implode(',', $array), "\n"; foreach ($array as &$value) {} // by reference echo implode(',', $array), "\n"; foreach ($array as $value) {} // by value (i.e., copy) echo implode(',', $array), "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 126) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 10
filename:       /in/6SVsS
function name:  (null)
number of ops:  28
compiled vars:  !0 = $array, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ECHO                                                     $3
          6        ECHO                                                     '%0A'
    5     7      > FE_RESET_RW                                      $4      !0, ->10
          8    > > FE_FETCH_RW                                              $4, !1, ->10
          9    > > JMP                                                      ->8
         10    >   FE_FREE                                                  $4
    6    11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '%2C'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        ECHO                                                     $5
         16        ECHO                                                     '%0A'
    8    17      > FE_RESET_R                                       $6      !0, ->20
         18    > > FE_FETCH_R                                               $6, !1, ->20
         19    > > JMP                                                      ->18
         20    >   FE_FREE                                                  $6
    9    21        INIT_FCALL                                               'implode'
         22        SEND_VAL                                                 '%2C'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $7      
         25        ECHO                                                     $7
         26        ECHO                                                     '%0A'
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.69 ms | 1388 KiB | 15 Q