3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'A10-53 c'; var_export( array_map( function($char) { if (ctype_alpha($char)) { return 'letter'; } elseif (ctype_digit($char)) { return 'number'; } elseif (ctype_space($char)) { return 'space'; } return 'symbol'; }, str_split($string) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcVUa
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'A10-53+c'
    4     1        INIT_FCALL                                                   'var_export'
    5     2        INIT_FCALL                                                   'array_map'
    6     3        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
   15     4        SEND_VAL                                                     ~2
   16     5        INIT_FCALL                                                   'str_split'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                             $3      
          8        SEND_VAR                                                     $3
    5     9        DO_ICALL                                             $4      
   16    10        SEND_VAR                                                     $4
    4    11        DO_ICALL                                                     
   18    12      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcVUa
function name:  {closure:/in/mcVUa:6}
number of ops:  20
compiled vars:  !0 = $char
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1        INIT_FCALL                                                   'ctype_alpha'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $1      
          4      > JMPZ                                                         $1, ->7
    8     5    > > RETURN                                                       'letter'
    7     6*       JMP                                                          ->18
    9     7    >   INIT_FCALL                                                   'ctype_digit'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                             $2      
         10      > JMPZ                                                         $2, ->13
   10    11    > > RETURN                                                       'number'
    9    12*       JMP                                                          ->18
   11    13    >   INIT_FCALL                                                   'ctype_space'
         14        SEND_VAR                                                     !0
         15        DO_ICALL                                             $3      
         16      > JMPZ                                                         $3, ->18
   12    17    > > RETURN                                                       'space'
   14    18    > > RETURN                                                       'symbol'
   15    19*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
195.17 ms | 2227 KiB | 19 Q