1--TEST--
2catch assert() errors
3--INI--
4assert.active=1
5assert.warning=1
6assert.callback=
7assert.bail=0
8assert.quiet_eval=0
9--FILE--
10<?php
11function handler($errno, $errstr) {
12	echo "in handler()\n";
13	assert(E_RECOVERABLE_ERROR === $errno);
14	var_dump($errstr);
15}
16
17set_error_handler('handler', E_RECOVERABLE_ERROR);
18
19assert(1);
20assert('1');
21assert('$a');
22
23assert('aa=sd+as+safsafasfasafsaf');
24
25assert('0');
26
27assert_options(ASSERT_BAIL, 1);
28assert('aa=sd+as+safsafasfasafsaf');
29
30echo "done\n";
31
32?>
33--EXPECTF--
34Notice: Undefined variable: a in %sassert02.php(12) : assert code on line 1
35
36Warning: assert(): Assertion "$a" failed in %sassert02.php on line 12
37
38Parse error: %s error%sin %sassert02.php(14) : assert code on line 1
39in handler()
40%string|unicode%(%d) "assert(): Failure evaluating code:
41aa=sd+as+safsafasfasafsaf"
42
43Warning: assert(): Assertion "0" failed in %sassert02.php on line 16
44
45Parse error: %s error%sin %sassert02.php(19) : assert code on line 1
46in handler()
47%string|unicode%(%d) "assert(): Failure evaluating code:
48aa=sd+as+safsafasfasafsaf"
49