Home
last modified time | relevance | path

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

123456789

/PHP-5.5/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 stoped)
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 Dbug43344_1.phpt2 Bug #43344.1 (Wrong error message for undefined namespace constant)
22 Notice: Use of undefined constant bar - assumed 'bar' in %sbug43344_1.php on line 13
25 Notice: Use of undefined constant bar - assumed 'bar' in %sbug43344_1.php on line 3
28 Notice: Use of undefined constant bar - assumed 'bar' in %sbug43344_1.php on line 6
31 Notice: Use of undefined constant bar - assumed 'bar' in %sbug43344_1.php on line 9
H A Dns_076.phpt14 Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
16 Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
18 Notice: Use of undefined constant unknown - assumed 'unknown' in %sns_076.php on line %d
25 Fatal error: Undefined constant 'unknown' in %sns_076.php on line %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 Dbug43344_10.phpt2 Bug #43344.10 (Wrong error message for undefined namespace constant)
8 Fatal error: Undefined constant 'bar' in %sbug43344_10.php on line %d
H A Dbug43344_6.phpt2 Bug #43344.6 (Wrong error message for undefined namespace constant)
9 Fatal error: Undefined constant 'Foo\bar' in %sbug43344_6.php on line %d
H A Dbug43344_11.phpt2 Bug #43344.11 (Wrong error message for undefined namespace constant)
11 Fatal error: Undefined constant 'bar' in %sbug43344_11.php on line %d
H A Derrmsg_041.phpt2 errmsg: instanceof expects an object instance, constant given
11 Fatal error: instanceof expects an object instance, constant given in %s on line %d
H A Dbug43344_12.phpt2 Bug #43344.12 (Wrong error message for undefined namespace constant)
11 Fatal error: Undefined constant 'bar' in %sbug43344_12.php on line %d
H A Dbug43344_7.phpt2 Bug #43344.7 (Wrong error message for undefined namespace constant)
12 Fatal error: Undefined constant 'Foo\bar' in %sbug43344_7.php on line %d
H A Dconstants_003.phpt12 var_dump(foo, namespace\foo, \foo\foo, \foo, constant('foo'), constant('foo\foo'));
H A Dbug43344_13.phpt2 Bug #43344.13 (Wrong error message for undefined namespace constant)
12 Fatal error: Undefined constant 'bar' in %sbug43344_13.php on line %d
H A Dbug43344_8.phpt2 Bug #43344.8 (Wrong error message for undefined namespace constant)
12 Fatal error: Undefined constant 'Foo\bar' in %sbug43344_8.php on line %d
H A Dbug43344_9.phpt2 Bug #43344.9 (Wrong error message for undefined namespace constant)
13 Fatal error: Undefined constant 'Foo\bar' in %sbug43344_9.php on line %d
/PHP-5.5/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)
/PHP-5.5/ext/opcache/Optimizer/
H A Dzend_optimizer.c70 op_array->literals[i].constant = *zv; in zend_optimizer_add_literal()
73 Z_SET_REFCOUNT(op_array->literals[i].constant, 2); in zend_optimizer_add_literal()
74 Z_SET_ISREF(op_array->literals[i].constant); in zend_optimizer_add_literal()
81 op.constant = zend_optimizer_add_literal(op_array, &_c TSRMLS_CC); \
87 op.constant = zend_optimizer_add_literal(op_array, &_c TSRMLS_CC); \
102 # define LITERAL_LONG(op, val) ZVAL_LONG(&op.u.constant, val)
104 # define LITERAL_BOOL(op, val) ZVAL_BOOL(&op.u.constant, val)
134constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op1.constant+1].consta… in update_op1_const()
182constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].consta… in update_op2_const()
188constant+1].hash_value = zend_hash_func(Z_STRVAL(op_array->literals[opline->op2.constant+1].consta… in update_op2_const()
[all …]
/PHP-5.5/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";
22 Read class constant.
25 Fail to read class constant from instance.
30 Class constant not visible in object var_dump.
H A Dconstants_error_001.phpt2 Error case: duplicate class constant definition
13 Fatal error: Cannot redefine class constant myclass::myConst in %s on line 5
/PHP-5.5/Zend/
H A Dzend_language_parser.y703 …/* empty */ { $$.op_type = IS_CONST; Z_TYPE($$.u.constant) = IS_BOOL; Z_LVAL($$.u.constant) = …
775constant, 0); if ($2.op_type == IS_CONST) { add_function(&$2.u.constant, &$1.u.constant, &$2.u.con…
776constant, 0); if ($2.op_type == IS_CONST) { sub_function(&$2.u.constant, &$1.u.constant, &$2.u.con…
875constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.co…
881constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.co…
950constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.co…
951 …| '+' static_scalar { ZVAL_LONG(&$1.u.constant, 0); add_function(&$2.u.constant, &$1.u.constant, &…
952 …| '-' static_scalar { ZVAL_LONG(&$1.u.constant, 0); sub_function(&$2.u.constant, &$1.u.constant, &…
969constant), Z_STRLEN($2.u.constant)+1); memcpy(&(tmp[1]), Z_STRVAL($2.u.constant), Z_STRLEN($2.u.co…
978 /* empty */ { $$.op_type = IS_CONST; INIT_PZVAL(&$$.u.constant); array_init(&$$.u.constant); }
[all …]
H A Dzend_compile.c51 (target)->u.constant = CONSTANT(src.constant); \
2088 …memmove(Z_STRVAL(element_name->u.constant), Z_STRVAL(element_name->u.constant)+1, Z_STRLEN(element… in zend_resolve_non_class_name()
2108 …memmove(Z_STRVAL(element_name->u.constant), Z_STRVAL(element_name->u.constant)+len, Z_STRLEN(eleme… in zend_resolve_non_class_name()
2197 …memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+1, Z_STRLEN(class_name-… in zend_resolve_class_name()
2217 …memmove(Z_STRVAL(class_name->u.constant), Z_STRVAL(class_name->u.constant)+len, Z_STRLEN(class_nam… in zend_resolve_class_name()
2431 …cpy(&result->u.constant.value.str.val[result->u.constant.value.str.len + sizeof("::")-1], name->u. in zend_do_build_full_name()
2438 …cpy(&result->u.constant.value.str.val[result->u.constant.value.str.len + sizeof("\\")-1], name->u. in zend_do_build_full_name()
5811 …Z_STRVAL(offset->u.constant) = erealloc(Z_STRVAL(offset->u.constant), Z_STRLEN(offset->u.constant)… in zend_do_add_static_array_element()
5812 Z_STRVAL(offset->u.constant)[Z_STRLEN(offset->u.constant)+1] = Z_TYPE(offset->u.constant); in zend_do_add_static_array_element()
5813 Z_STRVAL(offset->u.constant)[Z_STRLEN(offset->u.constant)+2] = 0; in zend_do_add_static_array_element()
[all …]
/PHP-5.5/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-5.5/ext/standard/tests/math/
H A Dconstants.phpt26 foreach($constants as $constant) {
27 printf("%-10s: %s\n", $constant, constant($constant));

Completed in 59 milliseconds

123456789