3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = ['A', 'z', '+', '0', '8', '*', ' ']; foreach ($tests as $test) { echo "\n{$test}: "; if (ctype_alpha($test)) { echo 'letter'; } elseif (ctype_digit($test)) { echo 'number'; } elseif (ctype_space($test)) { echo 'space'; } else { echo 'symbol'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 27
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 27
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/0B1K0
function name:  (null)
number of ops:  29
compiled vars:  !0 = $tests, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $3      !0, ->27
          2    > > FE_FETCH_R                                               $3, !1, ->27
    5     3    >   ROPE_INIT                                     3  ~5      '%0A'
          4        ROPE_ADD                                      1  ~5      ~5, !1
          5        ROPE_END                                      2  ~4      ~5, '%3A+'
          6        ECHO                                                     ~4
    6     7        INIT_FCALL                                               'ctype_alpha'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10      > JMPZ                                                     $7, ->13
    7    11    >   ECHO                                                     'letter'
    6    12      > JMP                                                      ->26
    8    13    >   INIT_FCALL                                               'ctype_digit'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16      > JMPZ                                                     $8, ->19
    9    17    >   ECHO                                                     'number'
    8    18      > JMP                                                      ->26
   10    19    >   INIT_FCALL                                               'ctype_space'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $9      
         22      > JMPZ                                                     $9, ->25
   11    23    >   ECHO                                                     'space'
   10    24      > JMP                                                      ->26
   13    25    >   ECHO                                                     'symbol'
    4    26    > > JMP                                                      ->2
         27    >   FE_FREE                                                  $3
   15    28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.46 ms | 1008 KiB | 16 Q