range
range — Create an array containing a range of elements.Description
range( string|int|float $start, string|int|float $end, int|float $step = 1 ): arrayCreate an array containing a range of elements.
Parameters
start
First value of the sequence.
end
The sequence is ended upon reaching the end value.
step
If a step value is given, it will be used as the increment between elements in the sequence. step should be given as a positive number. If not specified, step will default to 1.
Return Values
Returns an array of elements from start to end, inclusive.More information about range on official PHP documentation site
range - Popular snippets
- PHP 8.0 / MySQL 5.7 implode array_filter preg_match array_map strlen range
last run:
2021-05-02 20:42:52
16
- PHP 8.1 / PostgreSQL 10 Bookings (ReadOnly) range array_merge shuffle join print_r
last run:
2024-07-06 17:00:18
10
- PHP 8.1 / MySQL 5.7 range shuffle array_slice implode
last run:
2024-12-06 17:29:42
9
- PHP 8.0 / MySQL 5.7 array_rand range preg_match preg_replace
last run:
2024-03-09 14:37:00
9
- PHP 8.1 / MySQL 5.7 sort memory_get_peak_usage range
last run:
2024-01-02 19:50:03
7
- PHP 8.1 / MySQL 5.7 range shuffle print_r array_splice
last run:
2024-07-25 09:01:44
6
- PHP 8.0 / MySQL 8.0 memory_get_usage range printf
last run:
2023-08-16 11:13:11
5
- PHP 8.1 / MySQL 5.7 sort memory_get_peak_usage range
last run:
2024-01-02 19:51:46
4
- PHP 8.2.13 / MySQL 8.0 memory_get_usage range printf
last run:
2023-08-16 11:15:48
4
- PHP 8.0 / MySQL 5.7 range print_r
last run:
2023-09-13 16:17:36
4
range - New snippets
-
PHP 8.1 / MySQL 5.7 var_dump range array_map implode
added at:
2024-12-12 08:37:42
1
-
PHP 8.1 / MySQL 5.7 var_dump range array_map implode
added at:
2024-12-12 08:37:18
2
-
PHP 8.2.13 / MySQL 8.0 count shuffle array_push array_slice var_export array_combine substr_replace range
added at:
2024-12-06 18:47:24
1
-
PHP 8.1 / MySQL 5.7 range shuffle implode
added at:
2024-12-06 17:22:01
1
-
PHP 8.1 / MySQL 5.7 range shuffle array_slice implode range shuffle array_slice implode
added at:
2024-12-06 17:09:48
9
-
PHP 8.1 / MySQL 5.7 range microtime shuffle count array_merge array_splice rand
added at:
2024-12-05 17:36:11
1
-
PHP 7.4 / MySQL 5.7 ini_set microtime range shuffle sort
added at:
2024-11-18 17:41:14
1
-
PHP 8.1 / MySQL 5.7 ini_set microtime range shuffle sort
added at:
2024-11-18 17:41:06
1
-
PHP 8.2.13 / MySQL 5.7 ini_set microtime range shuffle sort
added at:
2024-11-18 17:40:38
3