3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler (function($errno, $errstr, $errfile, $errline){ if(preg_match('~.*require_once\((.*?)\)\: failed~', $errstr, $matches)){ $file = $matches[1]; if(is_readable($file)){ echo 'caught require... error, file ' .$file . ' is readable o.O' ; }else{ echo 'caught require... error, file ' .$file . ' is NOT readable' ; //and here you can do some more test, like 'is xyz mounted' etc. } } }); require_once('adf');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EDlat
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FEDlat%3A4%240'
   15     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   17     4        INCLUDE_OR_EVAL                                          'adf', REQUIRE_ONCE
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FEDlat%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 23
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/EDlat
function name:  {closure}
number of ops:  24
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $matches, !5 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    5     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%7E.%2Arequire_once%5C%28%28.%2A%3F%29%5C%29%5C%3A+failed%7E'
          6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !4
          8        DO_ICALL                                         $6      
          9      > JMPZ                                                     $6, ->23
    6    10    >   FETCH_DIM_R                                      ~7      !4, 1
         11        ASSIGN                                                   !5, ~7
    7    12        INIT_FCALL                                               'is_readable'
         13        SEND_VAR                                                 !5
         14        DO_ICALL                                         $9      
         15      > JMPZ                                                     $9, ->20
    8    16    >   CONCAT                                           ~10     'caught+require...+error%2C+file+', !5
         17        CONCAT                                           ~11     ~10, '+is+readable+o.O'
         18        ECHO                                                     ~11
         19      > JMP                                                      ->23
   10    20    >   CONCAT                                           ~12     'caught+require...+error%2C+file+', !5
         21        CONCAT                                           ~13     ~12, '+is+NOT+readable'
         22        ECHO                                                     ~13
   15    23    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FEDlat%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.02 ms | 1401 KiB | 19 Q