/php-src/ext/standard/tests/array/ |
H A D | array_slice_variation1.phpt | 2 Test array_slice() - Third parameter (NULL vs 0) 6 var_dump(array_slice(range(1, 3), 0, NULL, 1)); 7 var_dump(array_slice(range(1, 3), 0, 0, 1)); 8 var_dump(array_slice(range(1, 3), 0, NULL)); 9 var_dump(array_slice(range(1, 3), 0, 0)); 11 var_dump(array_slice(range(1, 3), -1, 0)); 12 var_dump(array_slice(range(1, 3), -1, 0, 1)); 13 var_dump(array_slice(range(1, 3), -1, NULL)); 14 var_dump(array_slice(range(1, 3), -1, NULL, 1)); 19 var_dump(array_slice(range(1, 3), 0, $a)); [all …]
|
H A D | array_slice_basic.phpt | 2 Test array_slice() function : basic functionality 6 * Test basic functionality of array_slice() 9 echo "*** Testing array_slice() : basic functionality ***\n"; 17 // Calling array_slice() with all possible arguments 19 var_dump( array_slice($input, $offset, $length, $preserve_keys) ); 21 // Calling array_slice() with mandatory arguments 23 var_dump( array_slice($input, $offset) ); 28 *** Testing array_slice() : basic functionality ***
|
H A D | bug41686.phpt | 2 Bug #41686 (Omitting length param in array_slice not possible) 9 array_slice($a, 1), 10 array_slice($a, 1, 2, TRUE), 11 array_slice($a, 1, NULL, TRUE), 12 array_slice($b, 1), 13 array_slice($b, 1, 2, TRUE), 14 array_slice($b, 1, NULL, TRUE)
|
H A D | array_slice_variation10.phpt | 2 Test array_slice() function : usage variations - position of internal array pointer 6 * Check position of internal array pointer after calling array_slice() 9 echo "*** Testing array_slice() : usage variations ***\n"; 13 echo "\n-- Call array_slice() --\n"; 14 var_dump($result = array_slice($input, 2)); 24 *** Testing array_slice() : usage variations *** 26 -- Call array_slice() --
|
H A D | array_slice_variation11.phpt | 2 Test array_slice() function : usage variations - array has holes in buckets 6 * Check that results of array_slice are correct when there are holes in buckets caused by unset() 9 echo "*** Testing array_slice() : usage variations ***\n"; 13 var_dump(array_slice($input, $offset, $length)); 16 echo "\n-- Call array_slice() on array with string keys--\n"; 23 echo "\n-- Call array_slice() on array with packed keys--\n"; 35 *** Testing array_slice() : usage variations *** 37 -- Call array_slice() on array with string keys-- 63 -- Call array_slice() on array with packed keys--
|
H A D | array_slice_variation8.phpt | 2 Test array_slice() function : usage variations - multidimensional arrays 6 * Test array_slice when passed 11 echo "*** Testing array_slice() : usage variations ***\n"; 16 var_dump(array_slice($input, 1, 3)); 19 var_dump(array_slice($input[2], 1, 2)); 24 *** Testing array_slice() : usage variations ***
|
H A D | array_slice_variation9.phpt | 2 Test array_slice() function : usage variations - referenced variables 6 * Test array_slice() when: 11 echo "*** Testing array_slice() : usage variations ***\n"; 19 var_dump(array_slice($input, 1, 2)); 23 var_dump(array_slice($input, 1, 2, true)); 28 *** Testing array_slice() : usage variations ***
|
H A D | array_slice_variation6.phpt | 2 Test array_slice() function : usage variations - pass different int values as $length arg 6 * Pass different integer values as $length argument to array_slice() to test behaviour 9 echo "*** Testing array_slice() : usage variations ***\n"; 16 var_dump(array_slice($input, $offset, $i)); 19 var_dump(array_slice($input, $offset, PHP_INT_MAX)); 22 var_dump(array_slice($input, $offset, -PHP_INT_MAX)); 27 *** Testing array_slice() : usage variations ***
|
H A D | array_slice_variation5.phpt | 2 Test array_slice() function : usage variations - Pass different integers as $offset argument 6 * Pass different integers as $offset argument to test how array_slice() behaves 9 echo "*** Testing array_slice() : usage variations ***\n"; 15 var_dump(array_slice($input, $i)); 18 var_dump(array_slice($input, PHP_INT_MAX)); 21 var_dump(array_slice($input, -PHP_INT_MAX)); 26 *** Testing array_slice() : usage variations ***
|
H A D | array_slice.phpt | 2 Testing array_slice() function 31 var_dump ( array_slice($sub_array, 1) ); 32 var_dump ( array_slice($sub_array, 0) ); 33 var_dump ( array_slice($sub_array, -2) ); 38 var_dump ( array_slice($sub_array, 1, 3) ); 39 var_dump ( array_slice($sub_array, 1, 0) ); 40 var_dump ( array_slice($sub_array, 1, -3) ); 41 var_dump ( array_slice($sub_array, 0, 3) ); 42 var_dump ( array_slice($sub_array, 0, 0) ); 43 var_dump ( array_slice($sub_array, 0, -3) ); [all …]
|
H A D | bug43541.phpt | 7 var_dump(array_slice($arr, 0, (float)2)); 8 var_dump(array_slice($arr, 0, (int)2));
|
H A D | array_slice_variation7.phpt | 2 Test array_slice() function : usage variations - different data types as keys in an array 6 * Pass different data types as keys in an array to array_slice() 10 echo "*** Testing array_slice() : usage variations ***\n"; 83 // loop through each element of $inputs to check the behavior of array_slice() 88 var_dump( array_slice($input, $offset, $length, true) ); 90 var_dump( array_slice($input, $offset, $length, false) ); 97 *** Testing array_slice() : usage variations ***
|
H A D | bug28974.phpt | 8 print_r(array_slice($a,2,2147483645)); 11 print_r(array_slice($a,2,2147483646));
|
/php-src/Zend/tests/ |
H A D | call_user_func_array_array_slice_type_strict.phpt | 2 Type check in call_user_func_array() + array_slice() optimization (strict types) 11 call_user_func_array('var_dump', array_slice($array, 0, $len)); 18 call_user_func_array('var_dump', array_slice($array, 0, $len)); 24 call_user_func_array('var_dump', array_slice($array, 1, $len)); 28 array_slice(): Argument #3 ($length) must be of type ?int, array given 29 array_slice(): Argument #3 ($length) must be of type ?int, float given
|
H A D | call_user_func_array_array_slice_type.phpt | 2 Type check in call_user_func_array() + array_slice() optimization 10 call_user_func_array('var_dump', array_slice($array, 0, $len)); 16 call_user_func_array('var_dump', array_slice($array, 0, $len)); 19 call_user_func_array('var_dump', array_slice($array, 1, $len)); 23 array_slice(): Argument #3 ($length) must be of type ?int, array given
|
H A D | call_user_func_array_array_slice_named_args.phpt | 2 call_user_func_array() + array_slice() + named arguments 5 call_user_func_array('func', array_slice(array: $a, 1, 2));
|
H A D | bug74810.phpt | 7 var_dump(array_slice(func_get_args(), 1)); 10 var_dump(array_slice(func_get_args(), 5));
|
H A D | gh13670_003.phpt | 45 foreach (array_slice($objs, 0, $defaultThreshold) as $obj) { 59 // Result of array_slice() is a tmpvar that will be checked by 61 foreach (array_slice($objs, -10) as $obj) {
|
H A D | bug72598.phpt | 2 Bug #72598 (Reference is lost after array_slice()) 13 $a = array_slice($args, 0, 1);
|
H A D | bug72598_2.phpt | 2 Bug #72598.2 (Reference is lost after array_slice()) 16 $a = array_slice($args, 0, 1);
|
/php-src/Zend/tests/named_params/ |
H A D | internal.phpt | 6 var_dump(array_slice(array: [1, 2, 3, 4, 5], offset: 2, length: 2)); 7 var_dump(array_slice(length: 2, offset: 2, array: [1, 2, 3, 4, 5])); 9 var_dump(array_slice(array: ['a' => 0, 'b' => 1], offset: 1, preserve_keys: true)); 10 var_dump(array_slice(['a' => 0, 'b' => 1], preserve_keys: true, offset: 1));
|
/php-src/ext/opcache/tests/ |
H A D | bug81272.phpt | 2 Bug #81272: Segfault in var[] after array_slice with JIT 13 $newPages = array_slice([], 0, 0);
|
/php-src/Zend/tests/nullsafe_operator/ |
H A D | 013.phpt | 33 dump_error(fn() => array_slice($foo?->foo(), 0)); 34 dump_error(fn() => array_slice(['foo'], $foo?->foo())); 35 dump_error(fn() => array_slice(['foo'], 0, $foo?->foo())); 64 string(69) "array_slice(): Argument #1 ($array) must be of type array, null given" 66 Deprecated: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated in %s o…
|
/php-src/sapi/fuzzer/ |
H A D | generate_execute_corpus.php | 11 $testDirs = array_slice($argv, 2);
|
/php-src/ext/pdo/tests/ |
H A D | gh8626.phpt | 32 var_dump(array_slice($errorInfo, 0, 3)); // odbc, dblib 39 var_dump(array_slice($errorInfo, 0, 3)); // odbc, dblib
|