mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove bareword fallback for constants
Access to undefined constants will now always result in an Error exception being thrown. This required quite a few test changes, because there were many buggy tests that unintentionally used bareword fallback in combination with error suppression.
This commit is contained in:
parent
3d39479f4d
commit
aad39879f2
49 changed files with 375 additions and 470 deletions
|
@ -29,6 +29,9 @@ PHP 8.0 UPGRADE NOTES
|
|||
longer available. The error_get_last() function may be used instead.
|
||||
. Removed the ability to define case-insensitive constants. The third
|
||||
argument to define() may no longer be true.
|
||||
. Access to undefined constants now always results in an Error exception.
|
||||
Previously, unqualified constant accesses resulted in a warning and were
|
||||
interpreted as strings.
|
||||
. Removed ability to specify an autoloader using an __autoload() function.
|
||||
spl_autoload_register() should be used instead.
|
||||
. Removed create_function(). Anonymous functions may be used instead.
|
||||
|
|
|
@ -23,6 +23,7 @@ string(3) "Foo"
|
|||
|
||||
Warning: Constants may only evaluate to scalar values, arrays or resources in %sbug37811.php on line %d
|
||||
|
||||
Warning: Use of undefined constant Baz - assumed 'Baz' (this will throw an Error in a future version of PHP) in %sbug37811.php on line %d
|
||||
string(3) "Baz"
|
||||
===DONE===
|
||||
Fatal error: Uncaught Error: Undefined constant 'Baz' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -3,6 +3,8 @@ Bug #43344.1 (Wrong error message for undefined namespace constant)
|
|||
--FILE--
|
||||
<?php
|
||||
namespace Foo;
|
||||
use Error;
|
||||
|
||||
function f1($a=bar) {
|
||||
return $a;
|
||||
}
|
||||
|
@ -13,20 +15,31 @@ function f3($a=array(bar=>0)) {
|
|||
reset($a);
|
||||
return key($a);
|
||||
}
|
||||
echo bar."\n";
|
||||
echo f1()."\n";
|
||||
echo f2()."\n";
|
||||
echo f3()."\n";
|
||||
|
||||
try {
|
||||
echo bar."\n";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
echo f1()."\n";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
echo f2()."\n";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
try {
|
||||
echo f3()."\n";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 13
|
||||
bar
|
||||
|
||||
Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 3
|
||||
bar
|
||||
|
||||
Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 6
|
||||
bar
|
||||
|
||||
Warning: Use of undefined constant bar - assumed 'bar' (this will throw an Error in a future version of PHP) in %sbug43344_1.php on line 9
|
||||
bar
|
||||
--EXPECT--
|
||||
Undefined constant 'Foo\bar'
|
||||
Undefined constant 'Foo\bar'
|
||||
Undefined constant 'Foo\bar'
|
||||
Undefined constant 'Foo\bar'
|
||||
|
|
|
@ -14,4 +14,7 @@ $foo = new Foo();
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant FOO - assumed 'FOO' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
Fatal error: Uncaught Error: Undefined constant 'FOO' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -5,4 +5,7 @@ Bug #69755: segfault in ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER
|
|||
c . 10;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant c - assumed 'c' (this will throw an Error in a future version of PHP) in %sbug69755.php on line 2
|
||||
Fatal error: Uncaught Error: Undefined constant 'c' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -5,4 +5,7 @@ Bug #69788: Malformed script causes Uncaught Error in php-cgi, valgrind SIGILL
|
|||
--EXPECTF--
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
|
||||
Warning: Use of undefined constant t - assumed 't' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
Fatal error: Uncaught Error: Undefined constant 't' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
Bug #72944 (Null pointer deref in zval_delref_p).
|
||||
--FILE--
|
||||
<?php
|
||||
define('e', 'e');
|
||||
"a"== e & $A = $A? 0 : 0 ?:0;
|
||||
echo "OK\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant e - assumed 'e' (this will throw an Error in a future version of PHP) in %sbug72944.php on line 2
|
||||
|
||||
Notice: Undefined variable: A in %sbug72944.php on line 2
|
||||
Notice: Undefined variable: A in %sbug72944.php on line 3
|
||||
OK
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
--TEST--
|
||||
Bug #73163 (PHP hangs if error handler throws while accessing undef const in default value)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function doSomething(string $value = UNDEFINED) {
|
||||
}
|
||||
|
||||
set_error_handler(function($errno, $errstr) {
|
||||
throw new Exception($errstr);
|
||||
});
|
||||
|
||||
doSomething();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Exception: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): {closure}(%s)
|
||||
#1 %s(%d): doSomething()
|
||||
#2 {main}
|
||||
thrown in %s on line %d
|
|
@ -4,7 +4,11 @@ Defining constants with non-scalar values
|
|||
<?php
|
||||
|
||||
define('foo', new stdClass);
|
||||
var_dump(foo);
|
||||
try {
|
||||
var_dump(foo);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
define('foo', fopen(__FILE__, 'r'));
|
||||
var_dump(foo);
|
||||
|
@ -12,7 +16,5 @@ var_dump(foo);
|
|||
?>
|
||||
--EXPECTF--
|
||||
Warning: Constants may only evaluate to scalar values, arrays or resources in %s on line %d
|
||||
|
||||
Warning: Use of undefined constant foo - assumed 'foo' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
string(%d) "foo"
|
||||
resource(%d) of type (stream)
|
||||
Undefined constant 'foo'
|
||||
resource(5) of type (stream)
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
Persistent case insensitive and user defined constants
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(ZEND_THREAD_safe);
|
||||
var_dump(defined('ZEND_THREAD_safe'));
|
||||
define("ZEND_THREAD_safe", 123);
|
||||
var_dump(ZEND_THREAD_safe);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant ZEND_THREAD_safe - assumed 'ZEND_THREAD_safe' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
string(16) "ZEND_THREAD_safe"
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
int(123)
|
||||
|
|
|
@ -17,5 +17,7 @@ ok
|
|||
ok
|
||||
ok
|
||||
|
||||
Warning: Use of undefined constant BAR - assumed 'BAR' (this will throw an Error in a future version of PHP) in %sns_041.php on line 9
|
||||
BAR
|
||||
Fatal error: Uncaught Error: Undefined constant 'test\ns1\BAR' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -3,26 +3,28 @@
|
|||
--FILE--
|
||||
<?php
|
||||
namespace foo;
|
||||
use Error;
|
||||
|
||||
$a = array(unknown => unknown);
|
||||
|
||||
echo unknown;
|
||||
echo "\n";
|
||||
var_dump($a);
|
||||
echo \unknown;
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
||||
|
||||
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
||||
|
||||
Warning: Use of undefined constant unknown - assumed 'unknown' (this will throw an Error in a future version of PHP) in %sns_076.php on line %d
|
||||
unknown
|
||||
array(1) {
|
||||
["unknown"]=>
|
||||
%s(7) "unknown"
|
||||
try {
|
||||
$a = array(unknown => unknown);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_076.php:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %sns_076.php on line %d
|
||||
try {
|
||||
echo unknown;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
try {
|
||||
echo \unknown;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Undefined constant 'foo\unknown'
|
||||
Undefined constant 'foo\unknown'
|
||||
Undefined constant 'unknown'
|
||||
|
|
|
@ -7643,19 +7643,13 @@ void zend_compile_const(znode *result, zend_ast *ast) /* {{{ */
|
|||
opline = zend_emit_op_tmp(result, ZEND_FETCH_CONSTANT, NULL, NULL);
|
||||
opline->op2_type = IS_CONST;
|
||||
|
||||
if (is_fully_qualified) {
|
||||
if (is_fully_qualified || !FC(current_namespace)) {
|
||||
opline->op2.constant = zend_add_const_name_literal(
|
||||
resolved_name, 0);
|
||||
} else {
|
||||
opline->op1.num = IS_CONSTANT_UNQUALIFIED;
|
||||
if (FC(current_namespace)) {
|
||||
opline->op1.num |= IS_CONSTANT_IN_NAMESPACE;
|
||||
opline->op2.constant = zend_add_const_name_literal(
|
||||
resolved_name, 1);
|
||||
} else {
|
||||
opline->op2.constant = zend_add_const_name_literal(
|
||||
resolved_name, 0);
|
||||
}
|
||||
opline->op1.num = IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE;
|
||||
opline->op2.constant = zend_add_const_name_literal(
|
||||
resolved_name, 1);
|
||||
}
|
||||
opline->extended_value = zend_alloc_cache_slot();
|
||||
}
|
||||
|
@ -7985,7 +7979,8 @@ void zend_compile_const_expr_const(zend_ast **ast_ptr) /* {{{ */
|
|||
}
|
||||
|
||||
zend_ast_destroy(ast);
|
||||
*ast_ptr = zend_ast_create_constant(resolved_name, !is_fully_qualified ? IS_CONSTANT_UNQUALIFIED : 0);
|
||||
*ast_ptr = zend_ast_create_constant(resolved_name,
|
||||
!is_fully_qualified && FC(current_namespace) ? IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE : 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -917,9 +917,8 @@ void zend_assert_valid_class_name(const zend_string *const_name);
|
|||
|
||||
#define ZEND_DIM_IS 1
|
||||
|
||||
#define IS_CONSTANT_UNQUALIFIED 0x010
|
||||
#define IS_CONSTANT_CLASS 0x080 /* __CLASS__ in trait */
|
||||
#define IS_CONSTANT_IN_NAMESPACE 0x100
|
||||
#define IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE 0x100
|
||||
|
||||
static zend_always_inline int zend_check_arg_send_type(const zend_function *zf, uint32_t arg_num, uint32_t mask)
|
||||
{
|
||||
|
|
|
@ -424,7 +424,7 @@ failure:
|
|||
return &c->value;
|
||||
}
|
||||
|
||||
if (!(flags & IS_CONSTANT_UNQUALIFIED)) {
|
||||
if (!(flags & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -4153,7 +4153,7 @@ static zend_always_inline int _zend_quick_get_constant(
|
|||
zv = zend_hash_find_ex(EG(zend_constants), Z_STR_P(key), 1);
|
||||
if (zv) {
|
||||
c = (zend_constant*)Z_PTR_P(zv);
|
||||
} else if ((flags & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
|
||||
} else if (flags & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) {
|
||||
key++;
|
||||
zv = zend_hash_find_ex(EG(zend_constants), Z_STR_P(key), 1);
|
||||
if (zv) {
|
||||
|
@ -4163,22 +4163,8 @@ static zend_always_inline int _zend_quick_get_constant(
|
|||
|
||||
if (!c) {
|
||||
if (!check_defined_only) {
|
||||
if ((opline->op1.num & IS_CONSTANT_UNQUALIFIED) != 0) {
|
||||
char *actual = (char *)zend_memrchr(Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)), '\\', Z_STRLEN_P(RT_CONSTANT(opline, opline->op2)));
|
||||
if (!actual) {
|
||||
ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_STR_P(RT_CONSTANT(opline, opline->op2)));
|
||||
} else {
|
||||
actual++;
|
||||
ZVAL_STRINGL(EX_VAR(opline->result.var),
|
||||
actual, Z_STRLEN_P(RT_CONSTANT(opline, opline->op2)) - (actual - Z_STRVAL_P(RT_CONSTANT(opline, opline->op2))));
|
||||
}
|
||||
/* non-qualified constant - allow text substitution */
|
||||
zend_error(E_WARNING, "Use of undefined constant %s - assumed '%s' (this will throw an Error in a future version of PHP)",
|
||||
Z_STRVAL_P(EX_VAR(opline->result.var)), Z_STRVAL_P(EX_VAR(opline->result.var)));
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
zend_throw_error(NULL, "Undefined constant '%s'", Z_STRVAL_P(RT_CONSTANT(opline, opline->op2)));
|
||||
ZVAL_UNDEF(EX_VAR(opline->result.var));
|
||||
}
|
||||
return FAILURE;
|
||||
}
|
||||
|
|
|
@ -566,29 +566,10 @@ ZEND_API int zend_use_undefined_constant(zend_string *name, zend_ast_attr attr,
|
|||
} else if ((colon = (char*)zend_memrchr(ZSTR_VAL(name), ':', ZSTR_LEN(name)))) {
|
||||
zend_throw_error(NULL, "Undefined class constant '%s'", ZSTR_VAL(name));
|
||||
return FAILURE;
|
||||
} else if ((attr & IS_CONSTANT_UNQUALIFIED) == 0) {
|
||||
} else {
|
||||
zend_throw_error(NULL, "Undefined constant '%s'", ZSTR_VAL(name));
|
||||
return FAILURE;
|
||||
} else {
|
||||
char *actual = ZSTR_VAL(name);
|
||||
size_t actual_len = ZSTR_LEN(name);
|
||||
char *slash = (char *) zend_memrchr(actual, '\\', actual_len);
|
||||
|
||||
if (slash) {
|
||||
actual = slash + 1;
|
||||
actual_len -= (actual - ZSTR_VAL(name));
|
||||
}
|
||||
|
||||
zend_error(E_WARNING, "Use of undefined constant %s - assumed '%s' (this will throw an Error in a future version of PHP)", actual, actual);
|
||||
if (EG(exception)) {
|
||||
return FAILURE;
|
||||
} else {
|
||||
zend_string *result_str = zend_string_init(actual, actual_len, 0);
|
||||
zval_ptr_dtor_nogc(result);
|
||||
ZVAL_NEW_STR(result, result_str);
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
|
|||
LITERAL_INFO(opline->op1.constant, LITERAL_CONST, 1);
|
||||
break;
|
||||
case ZEND_FETCH_CONSTANT:
|
||||
if ((opline->op1.num & (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) == (IS_CONSTANT_IN_NAMESPACE|IS_CONSTANT_UNQUALIFIED)) {
|
||||
if (opline->op1.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) {
|
||||
LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 3);
|
||||
} else {
|
||||
LITERAL_INFO(opline->op2.constant, LITERAL_CONST, 2);
|
||||
|
|
|
@ -127,11 +127,8 @@ static void zend_dump_unused_op(const zend_op *opline, znode_op op, uint32_t fla
|
|||
} else if (ZEND_VM_OP_CONSTRUCTOR == (flags & ZEND_VM_OP_MASK)) {
|
||||
fprintf(stderr, " CONSTRUCTOR");
|
||||
} else if (ZEND_VM_OP_CONST_FETCH == (flags & ZEND_VM_EXT_MASK)) {
|
||||
if (op.num & IS_CONSTANT_UNQUALIFIED) {
|
||||
fprintf(stderr, " (unqualified)");
|
||||
}
|
||||
if (op.num & IS_CONSTANT_IN_NAMESPACE) {
|
||||
fprintf(stderr, " (in-namespace)");
|
||||
if (op.num & IS_CONSTANT_UNQUALIFIED_IN_NAMESPACE) {
|
||||
fprintf(stderr, " (unqualified-in-namespace)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,5 +13,8 @@ const A="hello";
|
|||
function getA() {return A;}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in %sbug66251.php on line 4
|
||||
A=A
|
||||
Fatal error: Uncaught Error: Undefined constant 'A' in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): getA()
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -8,18 +8,15 @@ opcache.optimization_level=0xFFFFBFFF
|
|||
<?php if (!extension_loaded('Zend OPcache')) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
define('E', 'E');
|
||||
define('R', 'R');
|
||||
define('See', 'See');
|
||||
0 & ~E & ~R;
|
||||
6 && ~See
|
||||
?>
|
||||
okey
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant E - assumed 'E' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d
|
||||
|
||||
Warning: A non-numeric value encountered in %s on line %d
|
||||
|
||||
Warning: Use of undefined constant R - assumed 'R' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d
|
||||
|
||||
Warning: A non-numeric value encountered in %s on line %d
|
||||
|
||||
Warning: Use of undefined constant See - assumed 'See' (this will throw an Error in a future version of PHP) in %sbug71843.php on line %d
|
||||
okey
|
||||
|
|
|
@ -3,10 +3,6 @@ Bug #74673 (Segfault when cast Reflection object to string with undefined consta
|
|||
--FILE--
|
||||
<?php
|
||||
|
||||
set_error_handler(function() {
|
||||
throw new Exception();
|
||||
});
|
||||
|
||||
class A
|
||||
{
|
||||
public function method($test = PHP_SELF + 1)
|
||||
|
@ -19,4 +15,4 @@ $class = new ReflectionClass('A');
|
|||
echo $class;
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Exception: in %sbug74673.php on line %d
|
||||
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Error: Undefined constant 'PHP_SELF' in %s on line %d
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Bug #76536 (PHP crashes with core dump when throwing exception in error handler)
|
||||
--FILE--
|
||||
<?php
|
||||
class SomeConstants {const SOME_CONSTANT = SOME_NONSENSE;}
|
||||
class SomeConstants {const SOME_CONSTANT = "foo" % 5; }
|
||||
|
||||
function handleError() {throw new ErrorException();}
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ $values = array(
|
|||
/*20*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*21*/ @undefined_var,
|
||||
/*21*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*22*/ @unset_var
|
||||
/*22*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
|
@ -303,23 +303,23 @@ NULL
|
|||
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
|
|
|
@ -62,10 +62,10 @@ $values = array (
|
|||
/*21*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*22*/ @undefined_var,
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*23*/ @unset_var
|
||||
/*23*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
|
@ -407,23 +407,23 @@ NULL
|
|||
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
|
|
|
@ -53,10 +53,10 @@ $values = array(
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var
|
||||
/*18*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
|
|
|
@ -19,9 +19,6 @@ var_dump( array_diff_ukey($array1, $array1, "unknown_function") );
|
|||
//function name within single quotes
|
||||
var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );
|
||||
|
||||
//function name without quotes
|
||||
var_dump( array_diff_ukey($array1, $array1, unknown_function) );
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
@ -30,11 +27,6 @@ var_dump( array_diff_ukey($array1, $array1, unknown_function) );
|
|||
Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Use of undefined constant unknown_function - assumed 'unknown_function' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
|
||||
Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
===DONE===
|
||||
|
|
|
@ -19,8 +19,6 @@ var_dump( array_intersect_uassoc($array1, $array2, "unknown_function") );
|
|||
//function name within single quotes
|
||||
var_dump( array_intersect_uassoc($array1, $array2, 'unknown_function') );
|
||||
|
||||
//function name without quotes
|
||||
var_dump( array_intersect_uassoc($array1, $array2, unknown_function) );
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
@ -29,11 +27,6 @@ var_dump( array_intersect_uassoc($array1, $array2, unknown_function) );
|
|||
Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Use of undefined constant unknown_function - assumed 'unknown_function' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
|
||||
Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
===DONE===
|
||||
|
|
|
@ -19,8 +19,6 @@ var_dump( array_intersect_ukey($array1, $array2, "unknown_function") );
|
|||
//function name within single quotes
|
||||
var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') );
|
||||
|
||||
//function name without quotes
|
||||
var_dump( array_intersect_ukey($array1, $array2, unknown_function) );
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
@ -29,11 +27,6 @@ var_dump( array_intersect_ukey($array1, $array2, unknown_function) );
|
|||
Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Use of undefined constant unknown_function - assumed 'unknown_function' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
|
||||
Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, function 'unknown_function' not found or invalid function name in %s on line %d
|
||||
NULL
|
||||
===DONE===
|
||||
|
|
|
@ -63,10 +63,10 @@ $unexpected_values = array (
|
|||
19 => new stdclass(),
|
||||
|
||||
// undefined data
|
||||
20 => @undefined_var,
|
||||
20 => @$undefined_var,
|
||||
|
||||
// unset data
|
||||
21 => @unset_var,
|
||||
21 => @$unset_var,
|
||||
|
||||
// resource variable
|
||||
22 => $fp
|
||||
|
@ -99,301 +99,301 @@ echo "Done";
|
|||
-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
|
||||
-- Iteration 1 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 2 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 3 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 4 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 5 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 6 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 7 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 8 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 9 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 10 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 11 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 12 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 13 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 14 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 15 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 16 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 17 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 20 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
|
|
|
@ -59,10 +59,10 @@ $unexpected_values = array(
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
|
@ -211,7 +211,7 @@ array(3) {
|
|||
}
|
||||
-- Iteration 13 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
@ -223,7 +223,7 @@ array(3) {
|
|||
}
|
||||
-- Iteration 14 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
@ -235,7 +235,7 @@ array(3) {
|
|||
}
|
||||
-- Iteration 15 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
@ -247,7 +247,7 @@ array(3) {
|
|||
}
|
||||
-- Iteration 16 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
@ -259,7 +259,7 @@ array(3) {
|
|||
}
|
||||
-- Iteration 17 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, object given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, object given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
@ -270,32 +270,28 @@ array(3) {
|
|||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[3]=>
|
||||
int(45)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[3]=>
|
||||
int(45)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 20 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, resource given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, resource given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
|
|
@ -63,10 +63,10 @@ $unexpected_values = array (
|
|||
19 => new stdclass(),
|
||||
|
||||
// undefined data
|
||||
20 => @undefined_var,
|
||||
20 => @$undefined_var,
|
||||
|
||||
// unset data
|
||||
21 => @unset_var,
|
||||
21 => @$unset_var,
|
||||
|
||||
// resource variable
|
||||
22 => $fp
|
||||
|
@ -359,29 +359,29 @@ Warning: asort() expects parameter 1 to be array, object given in %s on line %d
|
|||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ $unexpected_values = array(
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
|
@ -270,26 +270,22 @@ array(3) {
|
|||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: asort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: asort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ var_dump( count() ); // No. of args = 0
|
|||
var_dump( count(array(), COUNT_NORMAL, 100) ); // No. of args > expected
|
||||
|
||||
/* Testing Invalid type arguments */
|
||||
var_dump( count("string", ABCD) );
|
||||
var_dump( count("string", "ABCD") );
|
||||
var_dump( count(100, "string") );
|
||||
var_dump( count(array(), "") );
|
||||
|
||||
|
@ -237,8 +237,6 @@ NULL
|
|||
Warning: count() expects at most 2 parameters, 3 given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: Use of undefined constant ABCD - assumed 'ABCD' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
|
||||
Warning: count() expects parameter 2 to be int, %s given in %s on line %d
|
||||
NULL
|
||||
|
||||
|
|
|
@ -62,10 +62,10 @@ $unexpected_values = array (
|
|||
/*19*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*20*/ @undefined_var,
|
||||
/*20*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*21*/ @unset_var,
|
||||
/*21*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*22*/ $fp
|
||||
|
@ -357,29 +357,29 @@ Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
|
|||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
|
|
@ -58,10 +58,10 @@ $unexpected_values = array (
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
|
@ -269,28 +269,24 @@ array(3) {
|
|||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[45]=>
|
||||
int(45)
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[45]=>
|
||||
int(45)
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 20 --
|
||||
|
||||
|
|
|
@ -61,10 +61,10 @@ $unexpected_values = array (
|
|||
/*19*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*20*/ @undefined_var,
|
||||
/*20*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*21*/ @unset_var,
|
||||
/*21*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*22*/ $fp
|
||||
|
@ -357,29 +357,29 @@ Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
|
|||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
|
|
@ -58,10 +58,10 @@ $unexpected_values = array (
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
|
@ -269,26 +269,22 @@ array(3) {
|
|||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[10]=>
|
||||
int(10)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[10]=>
|
||||
int(10)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
|
|
|
@ -63,10 +63,10 @@ $unexpected_values = array (
|
|||
/*20*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*21*/ @undefined_var,
|
||||
/*21*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*22*/ @unset_var,
|
||||
/*22*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*23*/ $fp
|
||||
|
@ -358,29 +358,29 @@ Warning: sort() expects parameter 1 to be array, object given in %s on line %d
|
|||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: sort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: sort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
|
|
@ -58,10 +58,10 @@ $unexpected_values = array(
|
|||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
|
@ -273,26 +273,22 @@ array(3) {
|
|||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: sort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(10)
|
||||
[1]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: sort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(10)
|
||||
[1]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(45)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ output_handler=
|
|||
|
||||
$php = getenv('TEST_PHP_EXECUTABLE');
|
||||
$tmpfile = tempnam(__DIR__, 'phpt');
|
||||
$args = ' -n -dsafe_mode=off ';
|
||||
$args = ' -n ';
|
||||
|
||||
/* Regular Data Test */
|
||||
passthru($php . $args . ' -r " echo \"HELLO\"; "');
|
||||
|
@ -17,7 +17,7 @@ output_handler=
|
|||
/* Binary Data Test */
|
||||
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
$cmd = $php . $args . ' -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"';
|
||||
$cmd = $php . $args . ' -r \"readfile(@getenv(\'\\\'\'TEST_PHP_EXECUTABLE\'\\\'\')); \"';
|
||||
$cmd = $php . $args . ' -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
|
||||
} else {
|
||||
$cmd = $php . $args . ' -r \"readfile(@getenv(\\\\\\"TEST_PHP_EXECUTABLE\\\\\\")); \"';
|
||||
|
|
|
@ -38,7 +38,7 @@ var_dump( fscanf($file_handle, "%d%s%f", $int_var, $string_var) );
|
|||
fclose($file_handle);
|
||||
|
||||
// different invalid format strings
|
||||
$invalid_formats = array( $undefined_var, undefined_constant,
|
||||
$invalid_formats = array( $undefined_var,
|
||||
"%", "%h", "%.", "%d%m"
|
||||
);
|
||||
|
||||
|
@ -76,10 +76,6 @@ Warning: fscanf(): Different numbers of variable names and field specifiers in %
|
|||
int(-1)
|
||||
|
||||
Notice: Undefined variable: undefined_var in %s on line %d
|
||||
|
||||
Warning: Use of undefined constant undefined_constant - assumed 'undefined_constant' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ $misc_values = array (
|
|||
@$undef_var,
|
||||
|
||||
/* mixed types */
|
||||
@TRUE123,
|
||||
"TRUE123",
|
||||
"123string",
|
||||
"string123",
|
||||
"NULLstring"
|
||||
|
|
|
@ -16,7 +16,7 @@ var_dump(@explode(NULL, ""));
|
|||
var_dump(@explode("a", ""));
|
||||
var_dump(@explode("a", "a"));
|
||||
var_dump(@explode("a", NULL));
|
||||
var_dump(@explode(NULL, a));
|
||||
var_dump(@explode(NULL, "a"));
|
||||
var_dump(@explode("abc", "acb"));
|
||||
var_dump(@explode("somestring", "otherstring"));
|
||||
var_dump(@explode("somestring", "otherstring", -1));
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -9,8 +9,6 @@ Class constant declarations
|
|||
|
||||
class C
|
||||
{
|
||||
const c0 = UNDEFINED;
|
||||
|
||||
const c1 = 1, c2 = 1.5;
|
||||
const c3 = + 1, c4 = + 1.5;
|
||||
const c5 = -1, c6 = -1.5;
|
||||
|
@ -32,7 +30,6 @@ Class constant declarations
|
|||
}
|
||||
|
||||
echo "\nAttempt to access various kinds of class constants:\n";
|
||||
var_dump(C::c0);
|
||||
var_dump(C::c1);
|
||||
var_dump(C::c2);
|
||||
var_dump(C::c3);
|
||||
|
@ -61,16 +58,13 @@ Class constant declarations
|
|||
Notice: Undefined variable: undef in %s on line 5
|
||||
|
||||
Attempt to access various kinds of class constants:
|
||||
|
||||
Warning: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s on line %d
|
||||
string(9) "UNDEFINED"
|
||||
int(1)
|
||||
float(1.5)
|
||||
int(1)
|
||||
float(1.5)
|
||||
int(-1)
|
||||
float(-1.5)
|
||||
int(15)
|
||||
int(13)
|
||||
string(%d) "%s"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
|
@ -85,7 +79,7 @@ string(6) "hello2"
|
|||
|
||||
Expecting fatal error:
|
||||
|
||||
Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:53
|
||||
Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line 53
|
||||
thrown in %s on line %d
|
||||
|
|
|
@ -9,7 +9,6 @@ class ErrorCodes {
|
|||
const INFO = "Informational message\n";
|
||||
|
||||
static function print_fatal_error_codes() {
|
||||
echo "FATAL = " . FATAL . "\n";
|
||||
echo "self::FATAL = " . self::FATAL;
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +26,7 @@ ErrorCodes::print_fatal_error_codes();
|
|||
ErrorCodesDerived::print_fatal_error_codes();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: Use of undefined constant FATAL - assumed 'FATAL' (this will throw an Error in a future version of PHP) in %sconstants_scope_001.php on line %d
|
||||
FATAL = FATAL
|
||||
--EXPECT--
|
||||
self::FATAL = Fatal error
|
||||
self::FATAL = Worst error
|
||||
parent::FATAL = Fatal error
|
||||
|
|
|
@ -14,7 +14,7 @@ foreach ($strVals as $strVal) {
|
|||
foreach($strVals as $otherVal) {
|
||||
echo "--- testing: '$strVal' << '$otherVal' ---\n";
|
||||
try {
|
||||
var_dump(strVal<<$otherVal);
|
||||
var_dump($strVal<<$otherVal);
|
||||
} catch (Throwable $e) {
|
||||
echo "Exception: " . $e->getMessage() . "\n";
|
||||
}
|
||||
|
@ -53,17 +53,17 @@ int(0)
|
|||
--- testing: '0' << 'a5.9' ---
|
||||
int(0)
|
||||
--- testing: '65' << '0' ---
|
||||
int(0)
|
||||
int(65)
|
||||
--- testing: '65' << '65' ---
|
||||
int(0)
|
||||
--- testing: '65' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '65' << '1.2' ---
|
||||
int(0)
|
||||
int(130)
|
||||
--- testing: '65' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '65' << 'abc' ---
|
||||
int(0)
|
||||
int(65)
|
||||
--- testing: '65' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '65' << '123e5' ---
|
||||
|
@ -77,21 +77,21 @@ int(0)
|
|||
--- testing: '65' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '65' << '3.4a' ---
|
||||
int(0)
|
||||
int(520)
|
||||
--- testing: '65' << 'a5.9' ---
|
||||
int(0)
|
||||
int(65)
|
||||
--- testing: '-44' << '0' ---
|
||||
int(0)
|
||||
int(-44)
|
||||
--- testing: '-44' << '65' ---
|
||||
int(0)
|
||||
--- testing: '-44' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '-44' << '1.2' ---
|
||||
int(0)
|
||||
int(-88)
|
||||
--- testing: '-44' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '-44' << 'abc' ---
|
||||
int(0)
|
||||
int(-44)
|
||||
--- testing: '-44' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '-44' << '123e5' ---
|
||||
|
@ -105,21 +105,21 @@ int(0)
|
|||
--- testing: '-44' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '-44' << '3.4a' ---
|
||||
int(0)
|
||||
int(-352)
|
||||
--- testing: '-44' << 'a5.9' ---
|
||||
int(0)
|
||||
int(-44)
|
||||
--- testing: '1.2' << '0' ---
|
||||
int(0)
|
||||
int(1)
|
||||
--- testing: '1.2' << '65' ---
|
||||
int(0)
|
||||
--- testing: '1.2' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '1.2' << '1.2' ---
|
||||
int(0)
|
||||
int(2)
|
||||
--- testing: '1.2' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '1.2' << 'abc' ---
|
||||
int(0)
|
||||
int(1)
|
||||
--- testing: '1.2' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '1.2' << '123e5' ---
|
||||
|
@ -133,21 +133,21 @@ int(0)
|
|||
--- testing: '1.2' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '1.2' << '3.4a' ---
|
||||
int(0)
|
||||
int(8)
|
||||
--- testing: '1.2' << 'a5.9' ---
|
||||
int(0)
|
||||
int(1)
|
||||
--- testing: '-7.7' << '0' ---
|
||||
int(0)
|
||||
int(-7)
|
||||
--- testing: '-7.7' << '65' ---
|
||||
int(0)
|
||||
--- testing: '-7.7' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '-7.7' << '1.2' ---
|
||||
int(0)
|
||||
int(-14)
|
||||
--- testing: '-7.7' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '-7.7' << 'abc' ---
|
||||
int(0)
|
||||
int(-7)
|
||||
--- testing: '-7.7' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '-7.7' << '123e5' ---
|
||||
|
@ -161,9 +161,9 @@ int(0)
|
|||
--- testing: '-7.7' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '-7.7' << '3.4a' ---
|
||||
int(0)
|
||||
int(-56)
|
||||
--- testing: '-7.7' << 'a5.9' ---
|
||||
int(0)
|
||||
int(-7)
|
||||
--- testing: 'abc' << '0' ---
|
||||
int(0)
|
||||
--- testing: 'abc' << '65' ---
|
||||
|
@ -193,17 +193,17 @@ int(0)
|
|||
--- testing: 'abc' << 'a5.9' ---
|
||||
int(0)
|
||||
--- testing: '123abc' << '0' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123abc' << '65' ---
|
||||
int(0)
|
||||
--- testing: '123abc' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123abc' << '1.2' ---
|
||||
int(0)
|
||||
int(246)
|
||||
--- testing: '123abc' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123abc' << 'abc' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123abc' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '123abc' << '123e5' ---
|
||||
|
@ -217,21 +217,21 @@ int(0)
|
|||
--- testing: '123abc' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '123abc' << '3.4a' ---
|
||||
int(0)
|
||||
int(984)
|
||||
--- testing: '123abc' << 'a5.9' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123e5' << '0' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: '123e5' << '65' ---
|
||||
int(0)
|
||||
--- testing: '123e5' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123e5' << '1.2' ---
|
||||
int(0)
|
||||
int(24600000)
|
||||
--- testing: '123e5' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123e5' << 'abc' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: '123e5' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '123e5' << '123e5' ---
|
||||
|
@ -245,21 +245,21 @@ int(0)
|
|||
--- testing: '123e5' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '123e5' << '3.4a' ---
|
||||
int(0)
|
||||
int(98400000)
|
||||
--- testing: '123e5' << 'a5.9' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: '123e5xyz' << '0' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: '123e5xyz' << '65' ---
|
||||
int(0)
|
||||
--- testing: '123e5xyz' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123e5xyz' << '1.2' ---
|
||||
int(0)
|
||||
int(24600000)
|
||||
--- testing: '123e5xyz' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123e5xyz' << 'abc' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: '123e5xyz' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '123e5xyz' << '123e5' ---
|
||||
|
@ -273,21 +273,21 @@ int(0)
|
|||
--- testing: '123e5xyz' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '123e5xyz' << '3.4a' ---
|
||||
int(0)
|
||||
int(98400000)
|
||||
--- testing: '123e5xyz' << 'a5.9' ---
|
||||
int(0)
|
||||
int(12300000)
|
||||
--- testing: ' 123abc' << '0' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: ' 123abc' << '65' ---
|
||||
int(0)
|
||||
--- testing: ' 123abc' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: ' 123abc' << '1.2' ---
|
||||
int(0)
|
||||
int(246)
|
||||
--- testing: ' 123abc' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: ' 123abc' << 'abc' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: ' 123abc' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: ' 123abc' << '123e5' ---
|
||||
|
@ -301,21 +301,21 @@ int(0)
|
|||
--- testing: ' 123abc' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: ' 123abc' << '3.4a' ---
|
||||
int(0)
|
||||
int(984)
|
||||
--- testing: ' 123abc' << 'a5.9' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123 abc' << '0' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123 abc' << '65' ---
|
||||
int(0)
|
||||
--- testing: '123 abc' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123 abc' << '1.2' ---
|
||||
int(0)
|
||||
int(246)
|
||||
--- testing: '123 abc' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123 abc' << 'abc' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123 abc' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '123 abc' << '123e5' ---
|
||||
|
@ -329,21 +329,21 @@ int(0)
|
|||
--- testing: '123 abc' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '123 abc' << '3.4a' ---
|
||||
int(0)
|
||||
int(984)
|
||||
--- testing: '123 abc' << 'a5.9' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123abc ' << '0' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123abc ' << '65' ---
|
||||
int(0)
|
||||
--- testing: '123abc ' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123abc ' << '1.2' ---
|
||||
int(0)
|
||||
int(246)
|
||||
--- testing: '123abc ' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '123abc ' << 'abc' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '123abc ' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '123abc ' << '123e5' ---
|
||||
|
@ -357,21 +357,21 @@ int(0)
|
|||
--- testing: '123abc ' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '123abc ' << '3.4a' ---
|
||||
int(0)
|
||||
int(984)
|
||||
--- testing: '123abc ' << 'a5.9' ---
|
||||
int(0)
|
||||
int(123)
|
||||
--- testing: '3.4a' << '0' ---
|
||||
int(0)
|
||||
int(3)
|
||||
--- testing: '3.4a' << '65' ---
|
||||
int(0)
|
||||
--- testing: '3.4a' << '-44' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '3.4a' << '1.2' ---
|
||||
int(0)
|
||||
int(6)
|
||||
--- testing: '3.4a' << '-7.7' ---
|
||||
Exception: Bit shift by negative number
|
||||
--- testing: '3.4a' << 'abc' ---
|
||||
int(0)
|
||||
int(3)
|
||||
--- testing: '3.4a' << '123abc' ---
|
||||
int(0)
|
||||
--- testing: '3.4a' << '123e5' ---
|
||||
|
@ -385,9 +385,9 @@ int(0)
|
|||
--- testing: '3.4a' << '123abc ' ---
|
||||
int(0)
|
||||
--- testing: '3.4a' << '3.4a' ---
|
||||
int(0)
|
||||
int(24)
|
||||
--- testing: '3.4a' << 'a5.9' ---
|
||||
int(0)
|
||||
int(3)
|
||||
--- testing: 'a5.9' << '0' ---
|
||||
int(0)
|
||||
--- testing: 'a5.9' << '65' ---
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue