3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.67 ms | 1395 KiB | 15 Q