php-src/Zend/tests/018.phpt
2020-07-10 21:05:28 +02:00

25 lines
340 B
PHP

--TEST--
constant() tests
--FILE--
<?php
try {
var_dump(constant(""));
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
define("TEST_CONST", 1);
var_dump(constant("TEST_CONST"));
define("TEST_CONST2", "test");
var_dump(constant("TEST_CONST2"));
echo "Done\n";
?>
--EXPECT--
Undefined constant ""
int(1)
string(4) "test"
Done