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