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))); eval("namespace $namespace { class $className extends \ErrorException {} }"); $fullClassName = $namespace . '\\' . $className; throw new $fullClassName($errstr, 0, $errno, $errfile, $errline); }); $foo = 1/0;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3NjVB
function name:  (null)
number of ops:  7
compiled vars:  !0 = $foo
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%2F3NjVB%3A3%240'
   10     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
   12     4        DIV                                              ~3      1, 0
          5        ASSIGN                                                   !0, ~3
          6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F3NjVB%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/3NjVB
function name:  {closure}
number of ops:  36
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        ROPE_INIT                                     5  ~13     'namespace+'
         18        ROPE_ADD                                      1  ~13     ~13, !4
         19        ROPE_ADD                                      2  ~13     ~13, '+%7B+class+'
         20        ROPE_ADD                                      3  ~13     ~13, !5
         21        ROPE_END                                      4  ~12     ~13, '+extends+%5CErrorException+%7B%7D+%7D'
         22        INCLUDE_OR_EVAL                                          ~12, EVAL
    7    23        CONCAT                                           ~17     !4, '%5C'
         24        CONCAT                                           ~18     ~17, !5
         25        ASSIGN                                                   !6, ~18
    9    26        FETCH_CLASS                                   0  $20     !6
         27        NEW                                              $21     $20
         28        SEND_VAR_EX                                              !1
         29        SEND_VAL_EX                                              0
         30        SEND_VAR_EX                                              !0
         31        SEND_VAR_EX                                              !2
         32        SEND_VAR_EX                                              !3
         33        DO_FCALL                                      0          
         34      > THROW                                         0          $21
   10    35*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.17 ms | 1400 KiB | 21 Q