3v4l.org

run code in 300+ PHP versions simultaneously
<?php class WarningException extends ErrorException { } set_error_handler(function ($errno , $errstr, $errfile, $errline) { throw new WarningException($errstr, 0, $errno, $errfile, $errline); }, E_WARNING); try { $destination = 'http://badurl/'; $params = array(); $url = $destination . '?' . http_build_query($params); $response = file_get_contents($url); } catch (WarningException $e) { echo "Warning: ", $e->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 18
Branch analysis from position: 18
2 jumps found. (Code = 107) Position 1 = 19, Position 2 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LAWlF
function name:  (null)
number of ops:  24
compiled vars:  !0 = $destination, !1 = $params, !2 = $url, !3 = $response, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FLAWlF%3A7%240'
    9     2        SEND_VAL                                                 ~5
          3        SEND_VAL                                                 2
          4        DO_ICALL                                                 
   12     5        ASSIGN                                                   !0, 'http%3A%2F%2Fbadurl%2F'
   13     6        ASSIGN                                                   !1, <array>
   14     7        CONCAT                                           ~9      !0, '%3F'
          8        INIT_FCALL                                               'http_build_query'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        CONCAT                                           ~11     ~9, $10
         12        ASSIGN                                                   !2, ~11
   15    13        INIT_FCALL                                               'file_get_contents'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !3, $13
         17      > JMP                                                      ->23
   16    18  E > > CATCH                                       last         'WarningException'
   17    19    >   ECHO                                                     'Warning%3A+'
         20        INIT_METHOD_CALL                                         !4, 'getMessage'
         21        DO_FCALL                                      0  $15     
         22        ECHO                                                     $15
   18    23    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FLAWlF%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/LAWlF
function name:  {closure}
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      'WarningException'
          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 %00%7Bclosure%7D%2Fin%2FLAWlF%3A7%240

Class WarningException: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.86 ms | 1405 KiB | 19 Q