blob: 128063841666cc1abf3d916c37bd4e4a08e2036f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--TEST--
assert() - basic - check that assert can be switched off
--INI--
assert.active = 0
assert.warning = 0
assert.callback = f1
assert.bail = 0
assert.quiet_eval = 0
--FILE--
<?php
function f1()
{
echo "f1 called\n";
}
//String assert
$sa = "0 != 0";
var_dump($r2=assert($sa));
$sa = "0 == 0";
var_dump($r2=assert($sa));
//Non string assert
var_dump($r2=assert(0));
var_dump($r2=assert(1));
--EXPECTF--
bool(true)
bool(true)
bool(true)
bool(true)
|