php-src/ext/standard/tests/general_functions/error_get_last.phpt

44 lines
667 B
Plaintext
Raw Normal View History

2006-11-16 13:01:23 +00:00
--TEST--
error_get_last() tests
--FILE--
<?php
var_dump(error_get_last());
var_dump(error_get_last(true));
var_dump(error_get_last());
$a = $b;
var_dump(error_get_last());
echo "Done\n";
?>
--EXPECTF--
NULL
Warning: error_get_last() expects exactly 0 parameters, 1 given in %s on line %d
2006-11-16 13:01:23 +00:00
NULL
array(4) {
["type"]=>
int(2)
["message"]=>
string(54) "error_get_last() expects exactly 0 parameters, 1 given"
2006-11-16 13:01:23 +00:00
["file"]=>
2007-10-01 15:01:47 +00:00
string(%i) "%s"
2006-11-16 13:01:23 +00:00
["line"]=>
int(4)
2006-11-16 13:01:23 +00:00
}
Notice: Undefined variable: b in %s on line %d
array(4) {
["type"]=>
int(8)
["message"]=>
string(21) "Undefined variable: b"
["file"]=>
2007-10-01 15:01:47 +00:00
string(%i) "%s"
2006-11-16 13:01:23 +00:00
["line"]=>
int(7)
2006-11-16 13:01:23 +00:00
}
Done