3v4l.org

run code in 500+ PHP versions simultaneously
<?php function log_error( $type, $message, $file, $line ) { $error_reporting = error_reporting(); echo $error_reporting . ' - ' . ( $error_reporting & $type ) . PHP_EOL; } set_error_handler( 'log_error' ); trigger_error( 'A', E_USER_NOTICE ); @trigger_error( 'A', E_USER_NOTICE ); $constants = ['E_ERROR', 'E_USER_ERROR', 'E_USER_WARNING', 'E_USER_NOTICE', 'E_DEPRECATED', 'E_USER_DEPRECATED', 'E_RECOVERABLE_ERROR', 'E_ALL']; foreach ( $constants as $constant ) { echo $constant . ': ' . constant( $constant ) . PHP_EOL; error_reporting( constant( $constant ) ); trigger_error( 'A', E_USER_NOTICE ); @trigger_error( 'A', E_USER_NOTICE ); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 40
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 40
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/Y4rlG
function name:  (null)
number of ops:  42
compiled vars:  !0 = $constants, !1 = $constant
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'set_error_handler'
          1        SEND_VAL                                                     'log_error'
          2        DO_ICALL                                                     
   10     3        INIT_FCALL                                                   'trigger_error'
          4        SEND_VAL                                                     'A'
          5        SEND_VAL                                                     1024
          6        DO_ICALL                                                     
   11     7        BEGIN_SILENCE                                        ~4      
          8        INIT_FCALL                                                   'trigger_error'
          9        SEND_VAL                                                     'A'
         10        SEND_VAL                                                     1024
         11        DO_ICALL                                                     
         12        END_SILENCE                                                  ~4
   13    13        ASSIGN                                                       !0, <array>
   15    14      > FE_RESET_R                                           $7      !0, ->40
         15    > > FE_FETCH_R                                                   $7, !1, ->40
   16    16    >   CONCAT                                               ~8      !1, '%3A+'
         17        INIT_FCALL                                                   'constant'
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                             $9      
         20        CONCAT                                               ~10     ~8, $9
         21        CONCAT                                               ~11     ~10, '%0A'
         22        ECHO                                                         ~11
   17    23        INIT_FCALL                                                   'error_reporting'
         24        INIT_FCALL                                                   'constant'
         25        SEND_VAR                                                     !1
         26        DO_ICALL                                             $12     
         27        SEND_VAR                                                     $12
         28        DO_ICALL                                                     
   18    29        INIT_FCALL                                                   'trigger_error'
         30        SEND_VAL                                                     'A'
         31        SEND_VAL                                                     1024
         32        DO_ICALL                                                     
   19    33        BEGIN_SILENCE                                        ~15     
         34        INIT_FCALL                                                   'trigger_error'
         35        SEND_VAL                                                     'A'
         36        SEND_VAL                                                     1024
         37        DO_ICALL                                                     
         38        END_SILENCE                                                  ~15
   15    39      > JMP                                                          ->15
         40    >   FE_FREE                                                      $7
   20    41      > RETURN                                                       1

Function log_error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y4rlG
function name:  log_error
number of ops:  13
compiled vars:  !0 = $type, !1 = $message, !2 = $file, !3 = $line, !4 = $error_reporting
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        INIT_FCALL                                                   'error_reporting'
          5        DO_ICALL                                             $5      
          6        ASSIGN                                                       !4, $5
    5     7        CONCAT                                               ~7      !4, '+-+'
          8        BW_AND                                               ~8      !4, !0
          9        CONCAT                                               ~9      ~7, ~8
         10        CONCAT                                               ~10     ~9, '%0A'
         11        ECHO                                                         ~10
    6    12      > RETURN                                                       null

End of function log_error

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
134.29 ms | 487 KiB | 11 Q