3v4l.org

run code in 500+ PHP versions simultaneously
<?php ini_set('open_basedir', getcwd()); $path='../'; function throwErrorException($errno, $errstr, $errfile, $errline) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler('throwErrorException', E_WARNING); try { $isDir = (is_dir($path) === false || is_readable($path) === false); } catch (ErrorException $error) { $isDir = false; } restore_error_handler(); var_dump($isDir);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Found catch point at position: 23
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g2fsO
function name:  (null)
number of ops:  31
compiled vars:  !0 = $path, !1 = $isDir, !2 = $error
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'ini_set'
          1        SEND_VAL                                                     'open_basedir'
          2        INIT_FCALL                                                   'getcwd'
          3        DO_ICALL                                             $3      
          4        SEND_VAR                                                     $3
          5        DO_ICALL                                                     
    5     6        ASSIGN                                                       !0, '..%2F'
   10     7        INIT_FCALL                                                   'set_error_handler'
          8        SEND_VAL                                                     'throwErrorException'
          9        SEND_VAL                                                     2
         10        DO_ICALL                                                     
   12    11        INIT_FCALL                                                   'is_dir'
         12        SEND_VAR                                                     !0
         13        DO_ICALL                                             $7      
         14        TYPE_CHECK                                        4  ~8      $7
         15      > JMPNZ_EX                                             ~8      ~8, ->21
         16    >   INIT_FCALL                                                   'is_readable'
         17        SEND_VAR                                                     !0
         18        DO_ICALL                                             $9      
         19        TYPE_CHECK                                        4  ~10     $9
         20        BOOL                                                 ~8      ~10
         21    >   ASSIGN                                                       !1, ~8
         22      > JMP                                                          ->25
   13    23  E > > CATCH                                           last         'ErrorException'
   14    24    >   ASSIGN                                                       !1, <false>
   16    25    >   INIT_FCALL                                                   'restore_error_handler'
         26        DO_ICALL                                                     
   18    27        INIT_FCALL                                                   'var_dump'
         28        SEND_VAR                                                     !1
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Function throwerrorexception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/g2fsO
function name:  throwErrorException
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
          3        RECV                                                 !3      
    8     4        NEW                                                  $4      'ErrorException'
          5        SEND_VAR_EX                                                  !1
          6        SEND_VAL_EX                                                  0
          7        SEND_VAR_EX                                                  !0
          8        SEND_VAR_EX                                                  !2
          9        SEND_VAR_EX                                                  !3
         10        DO_FCALL                                          0          
         11      > THROW                                             0          $4
    9    12*     > RETURN                                                       null

End of function throwerrorexception

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.95 ms | 3348 KiB | 20 Q