Home
last modified time | relevance | path

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

12345678910>>...13

/PHP-8.0/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 Dbug77325.phpt15 foreach ($constants as $constant) {
16 var_dump($constant->class);
17 var_dump($constant->getDeclaringClass()->getName());
20 $constant = new ReflectionClassConstant(Bar::class, 'FOO');
21 var_dump($constant->class);
22 var_dump($constant->getDeclaringClass()->getName());
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";
49 Reflecting on class constant TestClass::PUB
76 Reflecting on class constant TestClass::PROT
103 Reflecting on class constant TestClass::PRIV
130 Reflecting on class constant TestClass::PRIV
/PHP-8.0/ext/opcache/Optimizer/
H A Dcompact_literals.c530 opline->op1.constant = map[opline->op1.constant]; in zend_optimizer_compact_literals()
533 opline->op2.constant = map[opline->op2.constant]; in zend_optimizer_compact_literals()
561 opline->op2.constant, in zend_optimizer_compact_literals()
562 opline->op1.constant, in zend_optimizer_compact_literals()
641 if (func_slot[opline->op2.constant] >= 0) { in zend_optimizer_compact_literals()
669 opline->op1.constant, in zend_optimizer_compact_literals()
670 opline->op2.constant, in zend_optimizer_compact_literals()
712 opline->op1.constant, in zend_optimizer_compact_literals()
713 opline->op2.constant, in zend_optimizer_compact_literals()
739 opline->op2.constant, in zend_optimizer_compact_literals()
[all …]
/PHP-8.0/Zend/tests/
H A D018.phpt2 constant() tests
7 var_dump(constant(""));
13 var_dump(constant("TEST_CONST"));
16 var_dump(constant("TEST_CONST2"));
21 Undefined constant ""
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 Dbug51791.phpt2 Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
10 constant('A::B1');
17 Undefined constant A::B1
H A Dbug43344_1.phpt2 Bug #43344.1 (Wrong error message for undefined namespace constant)
42 Undefined constant "Foo\bar"
43 Undefined constant "Foo\bar"
44 Undefined constant "Foo\bar"
45 Undefined constant "Foo\bar"
H A Dbug44827.phpt2 Bug #44827 (define() allows :: in constant names)
20 define(): Argument #1 ($constant_name) cannot be a class constant
21 define(): Argument #1 ($constant_name) cannot be a class constant
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 Dns_076.phpt28 Undefined constant "foo\unknown"
29 Undefined constant "foo\unknown"
30 Undefined constant "unknown"
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"));
/PHP-8.0/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
18 constant('A::protectedConst');
27 Cannot access protected constant A::protectedConst
H A Dconstants_visibility_003.phpt2 Class private constant visibility
18 constant('A::privateConst');
27 Cannot access private constant A::privateConst
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-8.0/ext/standard/tests/general_functions/
H A Dbug72920.phpt2 Bug #72920 (Accessing a private constant using constant() creates an exception AND warning)
10 var_dump(constant('Foo::C1'));
16 Cannot access private constant Foo::C1
/PHP-8.0/ext/intl/tests/
H A Dformatter_format_and_parse_errors.phpt12 /* Unknown type constant */
58 numfmt_format(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant
59 NumberFormatter::format(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant
60 numfmt_parse(): Argument #3 ($type) must be a NumberFormatter::TYPE_* constant
61 NumberFormatter::parse(): Argument #2 ($type) must be a NumberFormatter::TYPE_* constant
62 numfmt_format(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_…
63 NumberFormatter::format(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, u…
64 numfmt_parse(): Argument #3 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, use numfmt_p…
65 NumberFormatter::parse(): Argument #2 ($type) cannot be NumberFormatter::TYPE_CURRENCY constant, us…
/PHP-8.0/ext/standard/tests/math/
H A Dconstants.phpt26 foreach($constants as $constant) {
27 printf("%-10s: %s\n", $constant, constant($constant));
/PHP-8.0/Zend/tests/type_declarations/
H A Dscalar_constant_defaults.phpt64 echo "Testing int with default null constant" . PHP_EOL;
71 echo "Testing int with null null constant" . PHP_EOL;
78 echo "Testing nullable int with default null constant" . PHP_EOL;
81 echo "Testing nullable int with null null constant" . PHP_EOL;
98 Testing int with default null constant
100 Testing int with null null constant
102 Testing nullable int with default null constant
104 Testing nullable int with null null constant
/PHP-8.0/tests/lang/
H A Dbug44827.phpt2 Bug #44827 (Class error when trying to access :: as constant)
16 constant('::');
23 define(): Argument #1 ($constant_name) cannot be a class constant
/PHP-8.0/tests/output/
H A Dstream_isatty_err.phpt17 STDIN (constant): bool(true)
20 STDOUT (constant): bool(true)
23 STDERR (constant): bool(false)
H A Dstream_isatty_in-err.phpt17 STDIN (constant): bool(false)
20 STDOUT (constant): bool(true)
23 STDERR (constant): bool(false)
H A Dstream_isatty_in-out-err.phpt17 STDIN (constant): bool(false)
20 STDOUT (constant): bool(false)
23 STDERR (constant): bool(false)

Completed in 33 milliseconds

12345678910>>...13