3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('1,24,5', 4, '88, 12, 19, 6'); $res = array(); foreach($arr as $elem) { $subArr = explode(',',$elem); foreach($subArr as &$sub) trim($sub); //remove all unwanted spacing $res = array_merge($res, $subArr); } var_dump($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 22
Branch analysis from position: 4
2 jumps found. (Code = 125) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 126) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/3BeO0
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $res, !2 = $elem, !3 = $subArr, !4 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $7      !0, ->22
          3    > > FE_FETCH_R                                               $7, !2, ->22
    6     4    >   INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%2C'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
    7     9      > FE_RESET_RW                                      $10     !3, ->15
         10    > > FE_FETCH_RW                                              $10, !4, ->15
    8    11    >   INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !4
         13        DO_ICALL                                                 
    7    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $10
   10    16        INIT_FCALL                                               'array_merge'
         17        SEND_VAR                                                 !1
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !1, $12
    5    21      > JMP                                                      ->3
         22    >   FE_FREE                                                  $7
   13    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.19 ms | 1396 KiB | 21 Q