3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (['64a', '1.42', '-43b', '+45', '2.34e4', '64'] as $id){ printf("%6s: is_numeric: %6s; ctype_digit: %6s\r\n", $id, b(is_numeric($id)), b(ctype_digit($id))); } function b($b){ return $b?'true':'false'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 21
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/r8vjM
function name:  (null)
number of ops:  23
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $1      <array>, ->21
          1    > > FE_FETCH_R                                               $1, !0, ->21
    4     2    >   INIT_FCALL                                               'printf'
          3        SEND_VAL                                                 '%256s%3A+is_numeric%3A+%256s%3B+ctype_digit%3A+%256s%0D%0A'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL_BY_NAME                                       'b'
          6        INIT_FCALL                                               'is_numeric'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $2      
          9        SEND_VAR_NO_REF_EX                                       $2
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR                                                 $3
         12        INIT_FCALL_BY_NAME                                       'b'
         13        INIT_FCALL                                               'ctype_digit'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $4      
         16        SEND_VAR_NO_REF_EX                                       $4
         17        DO_FCALL                                      0  $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
    3    20      > JMP                                                      ->1
         21    >   FE_FREE                                                  $1
    9    22      > RETURN                                                   1

Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r8vjM
function name:  b
number of ops:  7
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~1      'true'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~1      'false'
          5    > > RETURN                                                   ~1
    9     6*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.07 ms | 1396 KiB | 19 Q