]> granicus.if.org Git - php/commitdiff
- Making compatible with 64bit plataform
authorFelipe Pena <felipe@php.net>
Sun, 18 May 2008 15:42:09 +0000 (15:42 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 18 May 2008 15:42:09 +0000 (15:42 +0000)
ext/standard/array.c
ext/standard/tests/array/array_slice_variation6.phpt

index c66fb1677f1e9659b09395963596b96338deda6b..4f6251b91b4304620136339ba3ec03346e034372 100644 (file)
@@ -2163,7 +2163,7 @@ PHP_FUNCTION(array_slice)
        /* ..and the length */
        if (length < 0) {
                length = num_in - offset + length;
-       } else if (((unsigned) offset + (unsigned) length) > (unsigned) num_in) {
+       } else if (((unsigned long) offset + (unsigned long) length) > (unsigned) num_in) {
                length = num_in - offset;
        }
 
index e37ed46c54dc89a0eb77e9a9c8f9e2279bcbc306..e32abfcbce285dcac473b84efcac22b1f5136f21 100644 (file)
@@ -133,10 +133,18 @@ array(4) {
 }
 
 -- $length is maximum integer value --
-array(0) {
+array(4) {
+  [0]=>
+  string(3) "two"
+  [1]=>
+  string(5) "three"
+  [2]=>
+  string(4) "nine"
+  ["ten"]=>
+  int(10)
 }
 
 -- $length is minimum integer value --
 array(0) {
 }
-Done
\ No newline at end of file
+Done