1--TEST--
2error_get_last() tests
3--FILE--
4<?php
5
6var_dump(error_get_last());
7var_dump(error_get_last(true));
8var_dump(error_get_last());
9
10$a = $b;
11
12var_dump(error_get_last());
13
14echo "Done\n";
15?>
16--EXPECTF--
17NULL
18
19Warning: error_get_last() expects exactly 0 parameters, 1 given in %s on line %d
20NULL
21array(4) {
22  ["type"]=>
23  int(2)
24  ["message"]=>
25  string(54) "error_get_last() expects exactly 0 parameters, 1 given"
26  ["file"]=>
27  string(%i) "%s"
28  ["line"]=>
29  int(4)
30}
31
32Notice: Undefined variable: b in %s on line %d
33array(4) {
34  ["type"]=>
35  int(8)
36  ["message"]=>
37  string(21) "Undefined variable: b"
38  ["file"]=>
39  string(%i) "%s"
40  ["line"]=>
41  int(7)
42}
43Done
44