Home
last modified time | relevance | path

Searched refs:constant (Results 1 – 25 of 299) sorted by relevance

12345678910>>...12

/PHP-7.4/Zend/tests/
H A D018.phpt2 constant() tests
6 var_dump(constant());
7 var_dump(constant("", ""));
8 var_dump(constant(""));
10 var_dump(constant(array()));
13 var_dump(constant("TEST_CONST"));
16 var_dump(constant("TEST_CONST2"));
21 Warning: constant() expects exactly 1 parameter, 0 given in %s on line %d
24 Warning: constant() expects exactly 1 parameter, 2 given in %s on line %d
27 Warning: constant(): Couldn't find constant in %s on line %d
[all …]
H A Dbug51791.phpt2 Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
9 var_dump(constant('A::B1'));
13 Warning: constant(): Couldn't find constant A::B1 in %s on line %d
H A Dconstants_001.phpt12 var_dump(constant('foo'));
13 var_dump(constant('1'));
14 var_dump(constant(1));
15 var_dump(constant(''));
16 var_dump(constant('1foo'));
H A Dcase_insensitive_constant_deprecation.phpt24 var_dump(constant('FOO')); // Ok
25 var_dump(constant('foo')); // Deprecated
26 var_dump(constant('NS\FOO')); // Ok
27 var_dump(constant('ns\FOO')); // Ok
28 var_dump(constant('ns\foo')); // Deprecated
51 var_dump(constant('FOO')); // Ok
52 var_dump(constant('foo')); // Deprecated
53 var_dump(constant('NS\FOO')); // Ok
54 var_dump(constant('ns\FOO')); // Ok
55 var_dump(constant('ns\foo')); // Deprecated
[all …]
H A Dconstant_expressions_self_referencing_array.phpt2 Self-referencing constant expression (part of a constant AST)
12 Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR' in %s:%d
H A Dbug43344_1.phpt2 Bug #43344.1 (Wrong error message for undefined namespace constant)
22 Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future versio…
25 Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future versio…
28 Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future versio…
31 Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future versio…
H A Dns_076.phpt14 Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a futur…
16 Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a futur…
18 Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a futur…
25 Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d
H A Dns_049.phpt2 049: __NAMESPACE__ constant and runtime names (php name)
7 var_dump(constant(__NAMESPACE__ . "\\FOO"));
H A Dns_048.phpt2 048: __NAMESPACE__ constant and runtime names (ns name)
9 var_dump(constant(__NAMESPACE__ . "\\FOO"));
H A Dbug46304.phpt2 Bug #46304 (defining namespaced constant using define())
61 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "NS1…
67 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "ns1…
70 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "ns1…
73 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "ns1…
76 Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is "ns1…
80 Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d
H A Dconstants_003.phpt12 var_dump(foo, namespace\foo, \foo\foo, \foo, constant('foo'), constant('foo\foo'));
H A Dbug43344_10.phpt2 Bug #43344.10 (Wrong error message for undefined namespace constant)
8 Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_10.php:%d
H A Dbug79778.phpt16 string(14) "<constant ast>"
23 [var] => <constant ast>
H A Dbug43344_6.phpt2 Bug #43344.6 (Wrong error message for undefined namespace constant)
9 Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d
/PHP-7.4/ext/reflection/tests/
H A DReflectionClass_hasConstant_001.phpt17 echo "Check existing constant: ";
19 echo "Check existing constant, different case: ";
21 echo "Check absent constant: ";
26 echo "Check inherited constant: ";
28 echo "Check absent constant: ";
32 Check existing constant: bool(true)
33 Check existing constant, different case: bool(false)
34 Check absent constant: bool(false)
35 Check inherited constant: bool(true)
36 Check absent constant: bool(false)
H A DReflectionClassConstant_basic1.phpt6 function reflectClassConstant($base, $constant) {
7 $constInfo = new ReflectionClassConstant($base, $constant);
10 echo "Reflecting on class constant $class::$constant\n\n";
14 var_dump(ReflectionClassConstant::export($base, $constant, true));
16 var_dump(ReflectionClassConstant::export($base, $constant, false));
53 Reflecting on class constant TestClass::PUB
91 Reflecting on class constant TestClass::PROT
129 Reflecting on class constant TestClass::PRIV
167 Reflecting on class constant TestClass::PRIV
/PHP-7.4/ext/opcache/Optimizer/
H A Dcompact_literals.c507 opline->op1.constant = map[opline->op1.constant]; in zend_optimizer_compact_literals()
510 opline->op2.constant = map[opline->op2.constant]; in zend_optimizer_compact_literals()
537 opline->op2.constant, in zend_optimizer_compact_literals()
538 opline->op1.constant, in zend_optimizer_compact_literals()
617 if (func_slot[opline->op2.constant] >= 0) { in zend_optimizer_compact_literals()
645 opline->op1.constant, in zend_optimizer_compact_literals()
646 opline->op2.constant, in zend_optimizer_compact_literals()
688 opline->op1.constant, in zend_optimizer_compact_literals()
689 opline->op2.constant, in zend_optimizer_compact_literals()
715 opline->op2.constant, in zend_optimizer_compact_literals()
[all …]
/PHP-7.4/tests/classes/
H A Dconstants_basic_002.phpt2 Basic class support - defining and reading a class constant.
10 echo "\nRead class constant.\n";
13 echo "\nFail to read class constant from instance.\n";
17 echo "\nClass constant not visible in object var_dump.\n";
21 Read class constant.
24 Fail to read class constant from instance.
29 Class constant not visible in object var_dump.
H A Dconstants_visibility_002.phpt2 Class protected constant visibility
17 constant('A::protectedConst');
24 Warning: constant(): Couldn't find constant A::protectedConst in %s on line %d
H A Dconstants_visibility_003.phpt2 Class private constant visibility
17 constant('A::privateConst');
24 Warning: constant(): Couldn't find constant A::privateConst in %s on line %d
H A Dconstants_error_001.phpt2 Error case: duplicate class constant definition
12 Fatal error: Cannot redefine class constant myclass::myConst in %s on line 5
/PHP-7.4/ext/standard/tests/general_functions/
H A Dbug72920.phpt2 Bug #72920 (Accessing a private constant using constant() creates an exception AND warning)
9 var_dump(constant('Foo::C1'));
11 Warning: constant(): Couldn't find constant Foo::C1 in %s on line %d
/PHP-7.4/tests/lang/
H A Dbug44827.phpt2 Bug #44827 (Class error when trying to access :: as constant)
10 var_dump(constant('::'));
15 Warning: constant(): Couldn't find constant :: in %s on line %d
/PHP-7.4/ext/standard/tests/math/
H A Dconstants.phpt26 foreach($constants as $constant) {
27 printf("%-10s: %s\n", $constant, constant($constant));
/PHP-7.4/ext/opcache/tests/
H A Dbug66440.phpt2 Bug #66440 (Optimisation of conditional JMPs based on pre-evaluate constant function calls)
12 if(constant('PHP_BINARY')) {

Completed in 30 milliseconds

12345678910>>...12