1--TEST--
2assert() - basic - Test that bailout works
3--INI--
4assert.active = 1
5assert.warning = 1
6assert.callback = f1
7assert.quiet_eval = 1
8assert.bail = 0
9error_reporting = -1
10display_errors = 1
11--FILE--
12<?php
13function f1($script, $line, $message, $user_message)
14{
15	echo "f1 called\n";
16}
17
18//bail out on error
19var_dump($rao = assert_options(ASSERT_BAIL, 1));
20var_dump($r2 = assert("0 != 0"));
21echo "If this is printed BAIL hasn't worked";
22--EXPECTF--
23int(0)
24
25Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
26
27Warning: assert(): Assertion "0 != 0" failed in %s on line 9
28
29Fatal error: Uncaught ArgumentCountError: Too few arguments to function f1(), 3 passed and exactly 4 expected in %sassert_error2.php:2
30Stack trace:
31#0 [internal function]: f1('%s', 9, '0 != 0')
32#1 %sassert_error2.php(9): assert('0 != 0')
33#2 {main}
34  thrown in %sassert_error2.php on line 2
35