3v4l.org

run code in 300+ PHP versions simultaneously
<?php @mkdir('test'); \register_shutdown_function('execOnShutdown'); \set_error_handler('phpErrorHandler'); function phpErrorHandler(int $errorType, string $errorMessage, string $errorFile, int $errorLine) : void { 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/IWOMt
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BEGIN_SILENCE                                    ~0      
          1        INIT_FCALL                                               'mkdir'
          2        SEND_VAL                                                 'test'
          3        DO_ICALL                                                 
          4        END_SILENCE                                              ~0
    5     5        INIT_FCALL                                               'register_shutdown_function'
          6        SEND_VAL                                                 'execOnShutdown'
          7        DO_ICALL                                                 
    6     8        INIT_FCALL                                               'set_error_handler'
          9        SEND_VAL                                                 'phpErrorHandler'
         10        DO_ICALL                                                 
   32    11      > RETURN                                                   1

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

End of function execonshutdown

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.57 ms | 1448 KiB | 19 Q