3v4l.org

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

Function isinteger:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lFfko
function name:  isInteger
number of ops:  7
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'ctype_digit'
          2        CAST                                          6  ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
    4     6*     > RETURN                                                   null

End of function isinteger

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.26 ms | 1397 KiB | 16 Q