File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
standard /
tests /
assert /
assert_basic2.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:03 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
assert() - basic - correct call back values before and after assert.
--INI--
assert.active = 1
assert.warning = 1
assert.callback=f1
assert.bail = 0
assert.quiet_eval = 0
--FILE--
<?php
function f2()
{
echo "f2 called\n";
}
function f1()
{
echo "f1 called\n";
}
var_dump($o = assert_options(ASSERT_CALLBACK));
assert(0);
var_dump($o= assert_options(ASSERT_CALLBACK, "f2"));
var_dump($n= assert_options(ASSERT_CALLBACK));
assert(0);
?>
--EXPECTF--
string(2) "f1"
f1 called
Warning: assert(): Assertion failed in %s on line 13
string(2) "f1"
string(2) "f2"
f2 called
Warning: assert(): Assertion failed in %s on line 17
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>