xref: /PHP-8.3/Zend/tests/018.phpt (revision d30cd7d7)
1--TEST--
2constant() tests
3--FILE--
4<?php
5
6try {
7    var_dump(constant(""));
8} catch (Error $e) {
9    echo $e->getMessage(), "\n";
10}
11
12define("TEST_CONST", 1);
13var_dump(constant("TEST_CONST"));
14
15define("TEST_CONST2", "test");
16var_dump(constant("TEST_CONST2"));
17
18echo "Done\n";
19?>
20--EXPECT--
21Undefined constant ""
22int(1)
23string(4) "test"
24Done
25