3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_GET['log'])) { set_error_handler( function( $errno, $errstr, $errfile, $errline ) { $error_types = array( E_ERROR => 'Error', E_WARNING => 'Warning', E_NOTICE => 'Notice', E_USER_ERROR => 'User error', E_USER_WARNING => 'User warning', E_USER_NOTICE => 'User notice', E_STRICT => 'Strictness notice', E_RECOVERABLE_ERROR => 'Recovarable error', E_DEPRECATED => 'Deprecation notice', E_USER_DEPRECATED => 'User deprecation notice', ); $file = fopen( __DIR__ . '/errors.log', 'a' ); fwrite( $file, '' . 'Date: ' . date( DATE_W3C ) . PHP_EOL . 'Type: ' . (isset( $error_types[$errno] ) ? $error_types[$errno] : $errno) . PHP_EOL . 'Message: ' . $errstr . PHP_EOL . 'Location: ' . $errfile . ' on line ' . $errline . PHP_EOL . PHP_EOL ); fclose( $file ); } ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/ZY4Ln
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~0      '_GET'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~0, 'log'
          2      > JMPZ                                                     ~1, ->7
    3     3    >   INIT_FCALL                                               'set_error_handler'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FZY4Ln%3A3%240'
   29     5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   30     7    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FZY4Ln%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZY4Ln
function name:  {closure}
number of ops:  41
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $error_types, !5 = $file
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, <array>
   17     5        INIT_FCALL                                               'fopen'
          6        SEND_VAL                                                 '%2Fin%2Ferrors.log'
          7        SEND_VAL                                                 'a'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !5, $7
   19    10        INIT_FCALL                                               'fwrite'
         11        SEND_VAR                                                 !5
   20    12        INIT_FCALL                                               'date'
         13        SEND_VAL                                                 'Y-m-d%5CTH%3Ai%3AsP'
         14        DO_ICALL                                         $9      
         15        CONCAT                                           ~10     'Date%3A+', $9
         16        CONCAT                                           ~11     ~10, '%0A'
   21    17        CONCAT                                           ~12     ~11, 'Type%3A+'
         18        ISSET_ISEMPTY_DIM_OBJ                         0          !4, !0
         19      > JMPZ                                                     ~13, ->23
         20    >   FETCH_DIM_R                                      ~14     !4, !0
         21        QM_ASSIGN                                        ~15     ~14
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~15     !0
         24    >   CONCAT                                           ~16     ~12, ~15
         25        CONCAT                                           ~17     ~16, '%0A'
   22    26        CONCAT                                           ~18     ~17, 'Message%3A+'
         27        CONCAT                                           ~19     ~18, !1
         28        CONCAT                                           ~20     ~19, '%0A'
   23    29        CONCAT                                           ~21     ~20, 'Location%3A+'
         30        CONCAT                                           ~22     ~21, !2
         31        CONCAT                                           ~23     ~22, '+on+line+'
         32        CONCAT                                           ~24     ~23, !3
         33        CONCAT                                           ~25     ~24, '%0A'
   24    34        CONCAT                                           ~26     ~25, '%0A'
         35        SEND_VAL                                                 ~26
         36        DO_ICALL                                                 
   27    37        INIT_FCALL                                               'fclose'
         38        SEND_VAR                                                 !5
         39        DO_ICALL                                                 
   29    40      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.2 ms | 1400 KiB | 23 Q