3v4l.org

run code in 300+ PHP versions simultaneously
<?php \register_shutdown_function('execOnShutdown'); \set_error_handler('phpErrorHandler'); @mkdir('test'); function phpErrorHandler(int $errorType, string $errorMessage, string $errorFile, int $errorLine) : void { echo 'error reporting value is : ' . error_reporting() . PHP_EOL; echo $errorType; if (!(error_reporting() & $errorType)) { return; } echo 'error reporting value is : ' . error_reporting() . PHP_EOL; echo('error type : ' . $errorType) . PHP_EOL; echo('error message : ' . $errorMessage) . PHP_EOL; echo('error file : ' . $errorFile) . PHP_EOL; echo('error line : ' . $errorLine) . PHP_EOL; return; } function execOnShutdown() : void { $error = \error_get_last(); if (! $error) { return; } phpErrorHandler($error['type'], $error['message'], $error['file'], $error['line']); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVP1S
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        SEND_VAL                                                 'execOnShutdown'
          2        DO_ICALL                                                 
    4     3        INIT_FCALL                                               'set_error_handler'
          4        SEND_VAL                                                 'phpErrorHandler'
          5        DO_ICALL                                                 
    6     6        BEGIN_SILENCE                                    ~2      
          7        INIT_FCALL                                               'mkdir'
          8        SEND_VAL                                                 'test'
          9        DO_ICALL                                                 
         10        END_SILENCE                                              ~2
   35    11      > RETURN                                                   1

Function phperrorhandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVP1S
function name:  phpErrorHandler
number of ops:  35
compiled vars:  !0 = $errorType, !1 = $errorMessage, !2 = $errorFile, !3 = $errorLine
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   11     4        INIT_FCALL                                               'error_reporting'
          5        DO_ICALL                                         $4      
          6        CONCAT                                           ~5      'error+reporting+value+is+%3A+', $4
          7        CONCAT                                           ~6      ~5, '%0A'
          8        ECHO                                                     ~6
   12     9        ECHO                                                     !0
   13    10        INIT_FCALL                                               'error_reporting'
         11        DO_ICALL                                         $7      
         12        BW_AND                                           ~8      !0, $7
         13        BOOL_NOT                                         ~9      ~8
         14      > JMPZ                                                     ~9, ->16
   14    15    > > RETURN                                                   null
   17    16    >   INIT_FCALL                                               'error_reporting'
         17        DO_ICALL                                         $10     
         18        CONCAT                                           ~11     'error+reporting+value+is+%3A+', $10
         19        CONCAT                                           ~12     ~11, '%0A'
         20        ECHO                                                     ~12
   18    21        CONCAT                                           ~13     'error+type+%3A+', !0
         22        CONCAT                                           ~14     ~13, '%0A'
         23        ECHO                                                     ~14
   19    24        CONCAT                                           ~15     'error+message+%3A+', !1
         25        CONCAT                                           ~16     ~15, '%0A'
         26        ECHO                                                     ~16
   20    27        CONCAT                                           ~17     'error+file+%3A+', !2
         28        CONCAT                                           ~18     ~17, '%0A'
         29        ECHO                                                     ~18
   21    30        CONCAT                                           ~19     'error+line+%3A+', !3
         31        CONCAT                                           ~20     ~19, '%0A'
         32        ECHO                                                     ~20
   23    33      > RETURN                                                   null
   24    34*     > RETURN                                                   null

End of function phperrorhandler

Function execonshutdown:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVP1S
function name:  execOnShutdown
number of ops:  17
compiled vars:  !0 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   29     3        BOOL_NOT                                         ~3      !0
          4      > JMPZ                                                     ~3, ->6
   30     5    > > RETURN                                                   null
   34     6    >   INIT_FCALL                                               'phperrorhandler'
          7        FETCH_DIM_R                                      ~4      !0, 'type'
          8        SEND_VAL                                                 ~4
          9        FETCH_DIM_R                                      ~5      !0, 'message'
         10        SEND_VAL                                                 ~5
         11        FETCH_DIM_R                                      ~6      !0, 'file'
         12        SEND_VAL                                                 ~6
         13        FETCH_DIM_R                                      ~7      !0, 'line'
         14        SEND_VAL                                                 ~7
         15        DO_FCALL                                      0          
   35    16      > RETURN                                                   null

End of function execonshutdown

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
188.25 ms | 1403 KiB | 24 Q