3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($errno, $errstr, $errfile, $errline) { $namespace = 'ajf\ErrorExceptions\Dynamic'; $className = implode('', explode(' ', ucwords($errstr))); $fullClassName = $namespace . '\\' . $className; if (!class_exists($fullClassName)) { eval("namespace $namespace { class $className extends \ErrorException {} }"); } throw new $fullClassName($errstr, 0, $errno, $errfile, $errline); }); try { $foo = 1/0; } catch (ajf\ErrorExceptions\Dynamic\DivisionByZero $e) { echo "ba-da-bing, ba-da-boom: I caught a $e!\n"; } try { $repent = sin("123abc"); } catch (ajf\ErrorExceptions\Dynamic\ANonWellFormedNumericStringEncountered $e) { echo "praise be to zend_is_numeric_string_ex: $e"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Found catch point at position: 17
Branch analysis from position: 17
2 jumps found. (Code = 107) Position 1 = 18, Position 2 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uYQ1n
function name:  (null)
number of ops:  22
compiled vars:  !0 = $foo, !1 = $e, !2 = $repent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FuYQ1n%3A3%240'
   12     2        SEND_VAL                                                 ~3
          3        DO_ICALL                                                 
   15     4        DIV                                              ~5      1, 0
          5        ASSIGN                                                   !0, ~5
          6      > JMP                                                      ->12
   16     7  E > > CATCH                                       last         'ajf%5CErrorExceptions%5CDynamic%5CDivisionByZero'
   17     8    >   ROPE_INIT                                     3  ~8      'ba-da-bing%2C+ba-da-boom%3A+I+caught+a+'
          9        ROPE_ADD                                      1  ~8      ~8, !1
         10        ROPE_END                                      2  ~7      ~8, '%21%0A'
         11        ECHO                                                     ~7
   21    12    >   INIT_FCALL                                               'sin'
         13        SEND_VAL                                                 '123abc'
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !2, $10
         16      > JMP                                                      ->21
   22    17  E > > CATCH                                       last         'ajf%5CErrorExceptions%5CDynamic%5CANonWellFormedNumericStringEncountered'
   23    18    >   NOP                                                      
         19        FAST_CONCAT                                      ~12     'praise+be+to+zend_is_numeric_string_ex%3A+', !1
         20        ECHO                                                     ~12
   24    21    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FuYQ1n%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 31
Branch analysis from position: 25
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 31
filename:       /in/uYQ1n
function name:  {closure}
number of ops:  41
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $namespace, !5 = $className, !6 = $fullClassName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        ASSIGN                                                   !4, 'ajf%5CErrorExceptions%5CDynamic'
    5     5        INIT_FCALL                                               'implode'
          6        SEND_VAL                                                 ''
          7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '+'
          9        INIT_FCALL                                               'ucwords'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                         $9      
         14        SEND_VAR                                                 $9
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !5, $10
    6    17        CONCAT                                           ~12     !4, '%5C'
         18        CONCAT                                           ~13     ~12, !5
         19        ASSIGN                                                   !6, ~13
    7    20        INIT_FCALL                                               'class_exists'
         21        SEND_VAR                                                 !6
         22        DO_ICALL                                         $15     
         23        BOOL_NOT                                         ~16     $15
         24      > JMPZ                                                     ~16, ->31
    8    25    >   ROPE_INIT                                     5  ~18     'namespace+'
         26        ROPE_ADD                                      1  ~18     ~18, !4
         27        ROPE_ADD                                      2  ~18     ~18, '+%7B+class+'
         28        ROPE_ADD                                      3  ~18     ~18, !5
         29        ROPE_END                                      4  ~17     ~18, '+extends+%5CErrorException+%7B%7D+%7D'
         30        INCLUDE_OR_EVAL                                          ~17, EVAL
   11    31    >   FETCH_CLASS                                   0  $22     !6
         32        NEW                                              $23     $22
         33        SEND_VAR_EX                                              !1
         34        SEND_VAL_EX                                              0
         35        SEND_VAR_EX                                              !0
         36        SEND_VAR_EX                                              !2
         37        SEND_VAR_EX                                              !3
         38        DO_FCALL                                      0          
         39      > THROW                                         0          $23
   12    40*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FuYQ1n%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.93 ms | 1400 KiB | 25 Q