3v4l.org

run code in 300+ PHP versions simultaneously
<?php function validateNumber($number) { try { //echo $number = (int)$number; var_dump(filter_var($number, FILTER_VALIDATE_INT)); } catch(Exception $e) { throw new PageNotAnInteger('That page number is not an integer'); } } validateNumber('2');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KeC9B
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                               'validatenumber'
          1        SEND_VAL                                                 '2'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function validatenumber:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/KeC9B
function name:  validateNumber
number of ops:  15
compiled vars:  !0 = $number, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'filter_var'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 257
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > JMP                                                      ->14
   15     9  E > > CATCH                                       last         'Exception'
   16    10    >   NEW                                              $4      'PageNotAnInteger'
         11        SEND_VAL_EX                                              'That+page+number+is+not+an+integer'
         12        DO_FCALL                                      0          
         13      > THROW                                         0          $4
   18    14    > > RETURN                                                   null

End of function validatenumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.94 ms | 1389 KiB | 18 Q