File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
018.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month 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
1: --TEST--
2: constant() tests
3: --FILE--
4: <?php
5:
6: var_dump(constant());
7: var_dump(constant("", ""));
8: var_dump(constant(""));
9:
10: var_dump(constant(array()));
11:
12: define("TEST_CONST", 1);
13: var_dump(constant("TEST_CONST"));
14:
15: define("TEST_CONST2", "test");
16: var_dump(constant("TEST_CONST2"));
17:
18: echo "Done\n";
19: ?>
20: --EXPECTF--
21: Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
22: NULL
23:
24: Warning: constant() expects exactly 1 parameter, 2 given in %s on line %d
25: NULL
26:
27: Warning: constant(): Couldn't find constant in %s on line %d
28: NULL
29:
30: Warning: constant() expects parameter 1 to be string, array given in %s on line %d
31: NULL
32: int(1)
33: string(4) "test"
34: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>