3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "ABCDE3883475"; $numbers = ""; $alphabets = ""; $strlen = strlen($string); for($i = 0; $i <= $strlen; $i++) { $char = substr($string, $i, 1); if(is_numeric($char)) { $numbers .= $char; } else { $alphabets .= $char; } } echo $numbers; echo PHP_EOL; echo $alphabets;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 7
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 7
Branch analysis from position: 23
Branch analysis from position: 7
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 7
Branch analysis from position: 23
Branch analysis from position: 7
filename:       /in/Xh4FR
function name:  (null)
number of ops:  27
compiled vars:  !0 = $string, !1 = $numbers, !2 = $alphabets, !3 = $strlen, !4 = $i, !5 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ABCDE3883475'
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, ''
    6     3        STRLEN                                           ~9      !0
          4        ASSIGN                                                   !3, ~9
    7     5        ASSIGN                                                   !4, 0
          6      > JMP                                                      ->21
    8     7    >   INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !4
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !5, $12
    9    13        INIT_FCALL                                               'is_numeric'
         14        SEND_VAR                                                 !5
         15        DO_ICALL                                         $14     
         16      > JMPZ                                                     $14, ->19
   10    17    >   ASSIGN_OP                                     8          !1, !5
         18      > JMP                                                      ->20
   12    19    >   ASSIGN_OP                                     8          !2, !5
    7    20    >   PRE_INC                                                  !4
         21    >   IS_SMALLER_OR_EQUAL                                      !4, !3
         22      > JMPNZ                                                    ~18, ->7
   15    23    >   ECHO                                                     !1
   16    24        ECHO                                                     '%0A'
   17    25        ECHO                                                     !2
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.06 ms | 1396 KiB | 17 Q