Annotation of embedaddon/php/Zend/tests/bug33771.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
                      3: --FILE--
                      4: <?php
                      5: 
                      6: error_reporting(E_ALL | E_STRICT);
                      7: 
                      8: var_dump(error_reporting());
                      9: 
                     10: function make_exception()
                     11: {
                     12:     throw new Exception();
                     13: }
                     14: 
                     15: function make_exception_and_change_err_reporting()
                     16: {
                     17:     error_reporting(E_ALL & ~E_STRICT);
                     18:     throw new Exception();
                     19: }
                     20: 
                     21: 
                     22: try {
                     23:        @make_exception();
                     24: } catch (Exception $e) {}
                     25: 
                     26: var_dump(error_reporting());
                     27: 
                     28: try {
                     29:        @make_exception_and_change_err_reporting();
                     30: } catch (Exception $e) {}
                     31: 
                     32: var_dump(error_reporting());
                     33: 
                     34: echo "Done\n";
                     35: ?>
                     36: --EXPECTF--    
                     37: int(32767)
                     38: int(32767)
                     39: int(30719)
                     40: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>