3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AtEase { private static $originalLevel = false; static function suppressWarnings() { self::$originalLevel = error_reporting( E_ALL & ~( E_WARNING | E_NOTICE | E_USER_WARNING | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT ) ); } static function restoreWarnings() { error_reporting( self::$originalLevel ); } } function sameAsLoggerDebug() { AtEase::suppressWarnings(); AtEase::restoreWarnings(); } function sameAsSessionStart() { sameAsLoggerDebug(); } print "PRE er=" . error_reporting() . ' ini=' . intval( ini_get( 'error_reporting' ) ) . "\n"; @sameAsSessionStart(); print "POST er=" . error_reporting() . ' ini=' . intval( ini_get( 'error_reporting' ) ) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F19bV
function name:  (null)
number of ops:  27
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_FCALL                                               'error_reporting'
          1        DO_ICALL                                         $0      
          2        CONCAT                                           ~1      'PRE+er%3D', $0
          3        CONCAT                                           ~2      ~1, '+ini%3D'
          4        INIT_FCALL                                               'ini_get'
          5        SEND_VAL                                                 'error_reporting'
          6        DO_ICALL                                         $3      
          7        CAST                                          4  ~4      $3
          8        CONCAT                                           ~5      ~2, ~4
          9        CONCAT                                           ~6      ~5, '%0A'
         10        ECHO                                                     ~6
   33    11        BEGIN_SILENCE                                    ~7      
         12        INIT_FCALL                                               'sameassessionstart'
         13        DO_FCALL                                      0          
         14        END_SILENCE                                              ~7
   34    15        INIT_FCALL                                               'error_reporting'
         16        DO_ICALL                                         $9      
         17        CONCAT                                           ~10     'POST+er%3D', $9
         18        CONCAT                                           ~11     ~10, '+ini%3D'
         19        INIT_FCALL                                               'ini_get'
         20        SEND_VAL                                                 'error_reporting'
         21        DO_ICALL                                         $12     
         22        CAST                                          4  ~13     $12
         23        CONCAT                                           ~14     ~11, ~13
         24        CONCAT                                           ~15     ~14, '%0A'
         25        ECHO                                                     ~15
         26      > RETURN                                                   1

Function sameasloggerdebug:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F19bV
function name:  sameAsLoggerDebug
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_STATIC_METHOD_CALL                                  'AtEase', 'suppressWarnings'
          1        DO_FCALL                                      0          
   25     2        INIT_STATIC_METHOD_CALL                                  'AtEase', 'restoreWarnings'
          3        DO_FCALL                                      0          
   26     4      > RETURN                                                   null

End of function sameasloggerdebug

Function sameassessionstart:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F19bV
function name:  sameAsSessionStart
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_FCALL                                               'sameasloggerdebug'
          1        DO_FCALL                                      0          
   30     2      > RETURN                                                   null

End of function sameassessionstart

Class AtEase:
Function suppresswarnings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F19bV
function name:  suppressWarnings
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'error_reporting'
   15     1        SEND_VAL                                                 4597
    8     2        DO_ICALL                                         $1      
    7     3        ASSIGN_STATIC_PROP                                       'originalLevel'
   15     4        OP_DATA                                                  $1
   17     5      > RETURN                                                   null

End of function suppresswarnings

Function restorewarnings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F19bV
function name:  restoreWarnings
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'error_reporting'
          1        FETCH_STATIC_PROP_R          global lock         ~0      'originalLevel'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   20     4      > RETURN                                                   null

End of function restorewarnings

End of class AtEase.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
282.3 ms | 1019 KiB | 17 Q