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)); var_dump(ctype_digit ($number)); } catch(Exception $e) { throw new PageNotAnInteger('That page number is not an integer'); } } validateNumber('123');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ubXEn
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                                                 '123'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function validatenumber:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/ubXEn
function name:  validateNumber
number of ops:  21
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     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'ctype_digit'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
         14      > JMP                                                      ->20
   15    15  E > > CATCH                                       last         'Exception'
   16    16    >   NEW                                              $6      'PageNotAnInteger'
         17        SEND_VAL_EX                                              'That+page+number+is+not+an+integer'
         18        DO_FCALL                                      0          
         19      > THROW                                         0          $6
   18    20    > > RETURN                                                   null

End of function validatenumber

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.4 ms | 1390 KiB | 20 Q