1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/Zend/tests/bug46304.phpt
Nikita Popov 23a5be3696 Remove ability to declare userland case-insensitive constants
This is part of https://wiki.php.net/rfc/case_insensitive_constant_deprecation.

This commit only removes the ability to declare such constants from
userland. Before the functionality can be removed entirely, it's
necessary to figure out the handling of true/false/null first.
2019-01-30 09:19:02 +01:00

39 lines
707 B
PHP

--TEST--
Bug #46304 (defining namespaced constant using define())
--FILE--
<?php
define('NS1\ns2\const1','value1');
define('ns1\ns2\const2','value2');
define('ns1\NS2\coNSt3','value3');
print NS1\ns2\const1 . "\n";
print ns1\ns2\const1 . "\n";
print ns1\NS2\const1 . "\n";
print NS1\ns2\const2 . "\n";
print ns1\ns2\const2 . "\n";
print ns1\NS2\const2 . "\n";
print NS1\ns2\coNSt3 . "\n";
print ns1\ns2\coNSt3 . "\n";
print ns1\ns2\coNSt3 . "\n";
print NS1\ns2\coNSt1 . "\n";
?>
--EXPECTF--
value1
value1
value1
value2
value2
value2
value3
value3
value3
Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d
Stack trace:
#0 {main}
thrown in %sbug46304.php on line %d