3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('one','two','tre','four','five'); $newArray = []; foreach ($array as $el) { foreach ($array as $el2) { if ($el === $el2) continue; $newArray[] = $el."/".$el2; } array_shift($array); } print_r($newArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/PkVsf
function name:  (null)
number of ops:  24
compiled vars:  !0 = $array, !1 = $newArray, !2 = $el, !3 = $el2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2      > FE_RESET_R                                       $6      !0, ->19
          3    > > FE_FETCH_R                                               $6, !2, ->19
    5     4    > > FE_RESET_R                                       $7      !0, ->14
          5    > > FE_FETCH_R                                               $7, !3, ->14
    6     6    >   IS_IDENTICAL                                             !2, !3
          7      > JMPZ                                                     ~8, ->9
          8    > > JMP                                                      ->5
    7     9    >   CONCAT                                           ~10     !2, '%2F'
         10        CONCAT                                           ~11     ~10, !3
         11        ASSIGN_DIM                                               !1
         12        OP_DATA                                                  ~11
    5    13      > JMP                                                      ->5
         14    >   FE_FREE                                                  $7
    9    15        INIT_FCALL                                               'array_shift'
         16        SEND_REF                                                 !0
         17        DO_ICALL                                                 
    4    18      > JMP                                                      ->3
         19    >   FE_FREE                                                  $6
   11    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.29 ms | 1396 KiB | 17 Q