1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/error_clear_last.phpt
T
Máté Kocsis 36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00

33 lines
407 B
PHP

--TEST--
error_clear_last() tests
--FILE--
<?php
var_dump(error_get_last());
error_clear_last();
var_dump(error_get_last());
@$a = $b;
var_dump(error_get_last());
error_clear_last();
var_dump(error_get_last());
echo "Done\n";
?>
--EXPECTF--
NULL
NULL
array(4) {
["type"]=>
int(2)
["message"]=>
string(21) "Undefined variable $b"
["file"]=>
string(%d) "%s"
["line"]=>
int(%d)
}
NULL
Done