3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array('a','b','c',1,2,3,4,5,'t','x','w'); $letters = array(); $numbers = array(); foreach($original as $element){ if(is_numeric($element)){ $numbers[] = $element; }else{ $letters[] = $element; } } var_dump($numbers); var_dump($letters);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/CAvVp
function name:  (null)
number of ops:  23
compiled vars:  !0 = $original, !1 = $letters, !2 = $numbers, !3 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    8     3      > FE_RESET_R                                       $7      !0, ->15
          4    > > FE_FETCH_R                                               $7, !3, ->15
    9     5    >   INIT_FCALL                                               'is_numeric'
          6        SEND_VAR                                                 !3
          7        DO_ICALL                                         $8      
          8      > JMPZ                                                     $8, ->12
   10     9    >   ASSIGN_DIM                                               !2
         10        OP_DATA                                                  !3
    9    11      > JMP                                                      ->14
   12    12    >   ASSIGN_DIM                                               !1
         13        OP_DATA                                                  !3
    8    14    > > JMP                                                      ->4
         15    >   FE_FREE                                                  $7
   16    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                                 
   17    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.79 ms | 999 KiB | 15 Q