3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "636 55 72 44"; $arr = str_split($str); for($i = 0; $i < count($arr); $i++){ if(($arr[$i] == preg_match('/[0-9]/')) || ($arr[$i] == "-") || ($arr[$i] == " ")){ echo "bien"; } else echo "mal"; } print_r($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 7
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 7
Branch analysis from position: 28
Branch analysis from position: 7
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 7
Branch analysis from position: 28
Branch analysis from position: 7
Branch analysis from position: 20
Branch analysis from position: 16
filename:       /in/AmJDk
function name:  (null)
number of ops:  32
compiled vars:  !0 = $str, !1 = $arr, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '636+55+72+44'
    4     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->25
    7     7    >   FETCH_DIM_R                                      ~7      !1, !2
          8        INIT_FCALL                                               'preg_match'
          9        SEND_VAL                                                 '%2F%5B0-9%5D%2F'
         10        DO_ICALL                                         $8      
         11        IS_EQUAL                                         ~9      $8, ~7
         12      > JMPNZ_EX                                         ~9      ~9, ->16
         13    >   FETCH_DIM_R                                      ~10     !1, !2
         14        IS_EQUAL                                         ~11     ~10, '-'
         15        BOOL                                             ~9      ~11
         16    > > JMPNZ_EX                                         ~9      ~9, ->20
         17    >   FETCH_DIM_R                                      ~12     !1, !2
         18        IS_EQUAL                                         ~13     ~12, '+'
         19        BOOL                                             ~9      ~13
         20    > > JMPZ                                                     ~9, ->23
    8    21    >   ECHO                                                     'bien'
    7    22      > JMP                                                      ->24
   11    23    >   ECHO                                                     'mal'
    6    24    >   PRE_INC                                                  !2
         25    >   COUNT                                            ~15     !1
         26        IS_SMALLER                                               !2, ~15
         27      > JMPNZ                                                    ~16, ->7
   14    28    >   INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.69 ms | 1008 KiB | 16 Q