xref: /PHP-8.0/Zend/tests/error_reporting03.phpt (revision 36935e42)
1--TEST--
2testing @ and error_reporting - 3
3--FILE--
4<?php
5
6error_reporting(E_ALL & ~E_DEPRECATED);
7
8function foo($arg) {
9    echo @$nonex_foo;
10}
11
12function bar() {
13    echo @$nonex_bar;
14    throw new Exception("test");
15}
16
17function foo1() {
18    echo $undef1;
19    error_reporting(E_ALL);
20    echo $undef2;
21}
22
23try {
24    @foo(@bar(@foo1()));
25} catch (Exception $e) {
26}
27
28var_dump(error_reporting());
29
30echo "Done\n";
31?>
32--EXPECTF--
33Warning: Undefined variable $undef2 in %s on line %d
34int(32767)
35Done
36