3v4l.org

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

Function isinteger:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2seAj
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:
155.73 ms | 1395 KiB | 15 Q