1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/error_reporting09.phpt
Máté Kocsis 36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00

32 lines
445 B
PHP

--TEST--
testing @ and error_reporting - 9
--FILE--
<?php
error_reporting(E_ALL & ~E_DEPRECATED);
function bar() {
echo @$blah;
echo $undef2;
}
function foo() {
echo @$undef;
error_reporting(E_ALL);
echo $blah;
return bar();
}
@foo();
var_dump(error_reporting());
echo "Done\n";
?>
--EXPECTF--
Warning: Undefined variable $blah in %s on line %d
Warning: Undefined variable $undef2 in %s on line %d
int(32767)
Done