3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Variable = "AAAA VALUE BBBB VALUE CCCC VALUE"; $startval = 1; $endval = 5; $var = explode("\n", $Variable); $str = ""; Foreach($var as $v){ $temp = explode(" " , $v); for($i=$startval; $i<=$endval; $i++){ $str .= $temp[0] .$i . " " . $temp[1] .$i. "\n"; } $str .= "\n"; } Echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 31
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 31
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 18
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 18
Branch analysis from position: 29
Branch analysis from position: 18
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/OPA8K
function name:  (null)
number of ops:  34
compiled vars:  !0 = $Variable, !1 = $startval, !2 = $endval, !3 = $var, !4 = $str, !5 = $v, !6 = $temp, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'AAAA+VALUE%0ABBBB+VALUE%0ACCCC+VALUE'
    6     1        ASSIGN                                                   !1, 1
    7     2        ASSIGN                                                   !2, 5
    9     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%0A'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $11     
          7        ASSIGN                                                   !3, $11
   11     8        ASSIGN                                                   !4, ''
   12     9      > FE_RESET_R                                       $14     !3, ->31
         10    > > FE_FETCH_R                                               $14, !5, ->31
   13    11    >   INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '+'
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                         $15     
         15        ASSIGN                                                   !6, $15
   14    16        ASSIGN                                                   !7, !1
         17      > JMP                                                      ->27
   15    18    >   FETCH_DIM_R                                      ~18     !6, 0
         19        CONCAT                                           ~19     ~18, !7
         20        CONCAT                                           ~20     ~19, '+'
         21        FETCH_DIM_R                                      ~21     !6, 1
         22        CONCAT                                           ~22     ~20, ~21
         23        CONCAT                                           ~23     ~22, !7
         24        CONCAT                                           ~24     ~23, '%0A'
         25        ASSIGN_OP                                     8          !4, ~24
   14    26        PRE_INC                                                  !7
         27    >   IS_SMALLER_OR_EQUAL                                      !7, !2
         28      > JMPNZ                                                    ~27, ->18
   17    29    >   ASSIGN_OP                                     8          !4, '%0A'
   12    30      > JMP                                                      ->10
         31    >   FE_FREE                                                  $14
   20    32        ECHO                                                     !4
   21    33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.64 ms | 1011 KiB | 14 Q