xref: /php-src/Zend/tests/constants_001.phpt (revision edf22962)
1--TEST--
2Defining and using constants
3--FILE--
4<?php
5
6define('foo', 	2);
7define('1', 	2);
8define(1, 		2);
9define('',		1);
10define('1foo',	3);
11
12var_dump(constant('foo'));
13var_dump(constant('1'));
14var_dump(constant(1));
15var_dump(constant(''));
16var_dump(constant('1foo'));
17
18?>
19--EXPECTF--
20Warning: Constant 1 already defined in %s on line %d
21int(2)
22int(2)
23int(2)
24int(1)
25int(3)
26