3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strValue = '-34'; if(ctype_digit((string) str_replace('-','',$strValue))){ echo 'true' ; } else { echo 'false'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JmBbD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $strValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '-34'
    4     1        INIT_FCALL                                               'ctype_digit'
          2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 '-'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        CAST                                          6  ~3      $2
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10      > JMPZ                                                     $4, ->13
    5    11    >   ECHO                                                     'true'
         12      > JMP                                                      ->14
    7    13    >   ECHO                                                     'false'
    8    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.76 ms | 1394 KiB | 17 Q