/PHP-8.0/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"; 95 // loop through each element of $inputs to check the behavior of array_slice() 100 var_dump( array_slice($input, $offset, $length, true) ); 102 var_dump( array_slice($input, $offset, $length, false) ); 109 *** 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-8.0/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));
|
H A D | call_user_func.phpt | 43 var_dump(call_user_func('array_slice', [1, 2, 3, 4, 5], length: 2)); 48 var_dump(call_user_func('array_slice', [1, 2, 3, 4, 'x' => 5], 3, preserve_keys: true)); 86 array_slice(): Argument #2 ($offset) not passed
|
/PHP-8.0/Zend/tests/ |
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 | 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-8.0/ext/opcache/tests/ |
H A D | bug81272.phpt | 2 Bug #81272: Segfault in var[] after array_slice with JIT 12 $newPages = array_slice([], 0, 0);
|
/PHP-8.0/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())); 57 string(69) "array_slice(): Argument #1 ($array) must be of type array, null given"
|
/PHP-8.0/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
|
/PHP-8.0/sapi/cli/tests/ |
H A D | argv_mb_bug77111.phpt | 25 file_put_contents($argv_fl, "<?php file_put_contents('$out_fl', implode(' ', array_slice(\$argv, 1)…
|
/PHP-8.0/sapi/phpdbg/ |
H A D | create-test.php | 57 $cmdargv = implode(" ", array_map("escapeshellarg", array_slice($real_argv, 1)));
|
/PHP-8.0/ext/standard/tests/general_functions/ |
H A D | proc_open_array.phpt | 63 $cmd = [$php, '-r', 'var_export(array_slice($argv, 1));', '--', ...$args];
|