summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2013-07-22 10:58:57 -0700
committerChristopher Jones <sixd@php.net>2013-07-22 10:58:57 -0700
commita1bf38e075ce7d6bbcbcf570444f13ea7558fa41 (patch)
treeaa492ea45da770d6e6db85dba336945a02765739 /ext/standard/tests/array
parentc7ee677f2f330bbcc8721b6a84dd3a05dc0c5541 (diff)
parent25f924abf62e70f3474b5885c12a521c68c2066d (diff)
downloadphp-git-a1bf38e075ce7d6bbcbcf570444f13ea7558fa41.tar.gz
Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
# By Anatol Belski (8) and others # Via Anatol Belski (2) and others * 'PHP-5.4' of https://git.php.net/repository/php-src: (44 commits) fixed possible null deref - addressed bug #65159, Misleading configure help text for --with-mysql-sock Update news for FILTER_SANITIZE_FULL_SPECIAL_CHARS fix Wrong value for FILTER_SANITIZE_FULL_SPECIAL_CHARS in REGISTER_LONG_CONSTANT Fixed bug #65304 (Use of max int in array_sum) Reorder NEWS Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait Fixed bug #65291 - get_defined_constants() crash with __CLASS__ in trait Properly fixed bug #63186 on NetBSD == 6.0 Improve php.ini-* documentation 5.4.19 is next Fixed bug #50308 - session id not appended properly for empty anchor tags Fix bug #62129 - rfc1867 crashes php even though turned off add news for xml fix fix TS build added sapi check for dl() test Make zval2myslqnd implementations aware of inheritance Fixed typo ensuring header str is \0 terminated fix buffer overrun fix invalid variable name at ext/spl/internal/multipleiterator.inc (key() method, too) ...
Diffstat (limited to 'ext/standard/tests/array')
-rw-r--r--ext/standard/tests/array/array_key_exists_variation2.phpt2
-rw-r--r--ext/standard/tests/array/array_search_variation4.phpt2
-rw-r--r--ext/standard/tests/array/array_values_variation7.phpt2
-rw-r--r--ext/standard/tests/array/bug34066.phpt4
-rw-r--r--ext/standard/tests/array/bug34066_1.phpt4
-rw-r--r--ext/standard/tests/array/bug65304.phpt10
-rw-r--r--ext/standard/tests/array/in_array_variation4.phpt2
-rw-r--r--ext/standard/tests/array/uasort_object2.phpt2
-rw-r--r--ext/standard/tests/array/uasort_variation10.phpt2
-rw-r--r--ext/standard/tests/array/uasort_variation4.phpt2
10 files changed, 21 insertions, 11 deletions
diff --git a/ext/standard/tests/array/array_key_exists_variation2.phpt b/ext/standard/tests/array/array_key_exists_variation2.phpt
index a6e9cd2bbf..69a1f0a6d1 100644
--- a/ext/standard/tests/array/array_key_exists_variation2.phpt
+++ b/ext/standard/tests/array/array_key_exists_variation2.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test array_key_exists() function : usage variations - Pass differnt data types to $search arg
+Test array_key_exists() function : usage variations - Pass different data types to $search arg
--FILE--
<?php
/* Prototype : bool array_key_exists(mixed $key, array $search)
diff --git a/ext/standard/tests/array/array_search_variation4.phpt b/ext/standard/tests/array/array_search_variation4.phpt
index 04f3b91388..c247879ccc 100644
--- a/ext/standard/tests/array/array_search_variation4.phpt
+++ b/ext/standard/tests/array/array_search_variation4.phpt
@@ -16,7 +16,7 @@ $file_handle = fopen(__FILE__, "r");
//directory type resource
$dir_handle = opendir( dirname(__FILE__) );
-//store resources in array for comparision.
+//store resources in array for comparison.
$resources = array($file_handle, $dir_handle);
// search for resouce type in the resource array
diff --git a/ext/standard/tests/array/array_values_variation7.phpt b/ext/standard/tests/array/array_values_variation7.phpt
index b713064569..660809357d 100644
--- a/ext/standard/tests/array/array_values_variation7.phpt
+++ b/ext/standard/tests/array/array_values_variation7.phpt
@@ -9,7 +9,7 @@ Test array_values() function : usage variations - Internal order check
/*
* Check that array_values is re-assigning keys according to the internal order of the array,
- * and is not dependant on the \$input argument's keys
+ * and is not dependent on the \$input argument's keys
*/
echo "*** Testing array_values() : usage variations ***\n";
diff --git a/ext/standard/tests/array/bug34066.phpt b/ext/standard/tests/array/bug34066.phpt
index 31f6b4c1db..023f4176fc 100644
--- a/ext/standard/tests/array/bug34066.phpt
+++ b/ext/standard/tests/array/bug34066.phpt
@@ -123,7 +123,7 @@ Bug #34066 (recursive array_walk causes segfault)
"ProceedKeyArticle" => "01",
"ActionKey" => "00",
"ContactCommissionArticle"=> "0,00",
- "QuantDependantPriceKey"=> "",
+ "QuantdependentPriceKey"=> "",
"Quant" => "1",
"QuantUnit" => "",
"Meas" => array(
@@ -584,7 +584,7 @@ gen_xml(prefix=/Docs/Doc/DocItems/DocItem/)
/Docs/Doc/DocItems/DocItem/ContactCommissionArticle=0,00
gen_xml(prefix=/Docs/Doc/DocItems/DocItem/) end
gen_xml(prefix=/Docs/Doc/DocItems/DocItem/)
-/Docs/Doc/DocItems/DocItem/QuantDependantPriceKey
+/Docs/Doc/DocItems/DocItem/QuantdependentPriceKey
gen_xml(prefix=/Docs/Doc/DocItems/DocItem/) end
gen_xml(prefix=/Docs/Doc/DocItems/DocItem/)
/Docs/Doc/DocItems/DocItem/Quant=1
diff --git a/ext/standard/tests/array/bug34066_1.phpt b/ext/standard/tests/array/bug34066_1.phpt
index edc16efd05..6d0f7f84e9 100644
--- a/ext/standard/tests/array/bug34066_1.phpt
+++ b/ext/standard/tests/array/bug34066_1.phpt
@@ -123,7 +123,7 @@ Bug #34066 (recursive array_walk causes segfault)
"ProceedKeyArticle" => "01",
"ActionKey" => "00",
"ContactCommissionArticle"=> "0,00",
- "QuantDependantPriceKey"=> "",
+ "QuantdependentPriceKey"=> "",
"Quant" => "1",
"QuantUnit" => "",
"Meas" => array(
@@ -543,7 +543,7 @@ gen_xml(prefix=/Docs/)
/Docs/ContactCommissionArticle=0,00
gen_xml(prefix=/Docs/) end
gen_xml(prefix=/Docs/)
-/Docs/QuantDependantPriceKey
+/Docs/QuantdependentPriceKey
gen_xml(prefix=/Docs/) end
gen_xml(prefix=/Docs/)
/Docs/Quant=1
diff --git a/ext/standard/tests/array/bug65304.phpt b/ext/standard/tests/array/bug65304.phpt
new file mode 100644
index 0000000000..e5c9dfc5e6
--- /dev/null
+++ b/ext/standard/tests/array/bug65304.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #65304 (Use of max int in array_sum)
+--FILE--
+<?php
+var_dump(array_sum(array(PHP_INT_MAX, 1)));
+var_dump(PHP_INT_MAX + 1);
+?>
+--EXPECTF--
+float(%s)
+float(%s)
diff --git a/ext/standard/tests/array/in_array_variation4.phpt b/ext/standard/tests/array/in_array_variation4.phpt
index b88a5a2d62..a27bb196b4 100644
--- a/ext/standard/tests/array/in_array_variation4.phpt
+++ b/ext/standard/tests/array/in_array_variation4.phpt
@@ -19,7 +19,7 @@ $file_handle = fopen(__FILE__, "r");
//directory type resource
$dir_handle = opendir( dirname(__FILE__) );
-//store resources in array for comparision.
+//store resources in array for comparison.
$resources = array($file_handle, $dir_handle);
// search for resouce type in the resource array
diff --git a/ext/standard/tests/array/uasort_object2.phpt b/ext/standard/tests/array/uasort_object2.phpt
index cd32d8d947..889db9886a 100644
--- a/ext/standard/tests/array/uasort_object2.phpt
+++ b/ext/standard/tests/array/uasort_object2.phpt
@@ -8,7 +8,7 @@ Test uasort() function : object functionality - sort diff. objects
*
/*
- * This testcase tests uasort() functionality with differnt objects
+ * This testcase tests uasort() functionality with different objects
* Objects of different classes:
* simple class,
* child class,
diff --git a/ext/standard/tests/array/uasort_variation10.phpt b/ext/standard/tests/array/uasort_variation10.phpt
index 809cb78f56..e0c5e72f7e 100644
--- a/ext/standard/tests/array/uasort_variation10.phpt
+++ b/ext/standard/tests/array/uasort_variation10.phpt
@@ -11,7 +11,7 @@ Test uasort() function : usage variations - sort array with reference variables
* Testing uasort() with 'array_arg' containing different reference variables
*/
-// comparision function
+// comparison function
/* Prototype : int cmp_function(mixed $value1, mixed $value2)
* Parameters : $value1 and $value2 - values to be compared
* Return value : 0 - if both values are same
diff --git a/ext/standard/tests/array/uasort_variation4.phpt b/ext/standard/tests/array/uasort_variation4.phpt
index c2844bfd24..0ed797fb87 100644
--- a/ext/standard/tests/array/uasort_variation4.phpt
+++ b/ext/standard/tests/array/uasort_variation4.phpt
@@ -12,7 +12,7 @@ Test uasort() function : usage variations - sort different numeric values
* integer, octal, hexadecimal & float
*/
-// comparision function
+// comparison function
/* Prototype : int cmp_function(mixed $value1, mixed $value2)
* Parameters : $value1 and $value2 - values to be compared
* Return value : 0 - if both values are same