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.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
- PHP 5.6 / MySQL 5.7 range count
last run:
2021-07-15 11:46:34
4
range - New snippets
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:52:43
1
-
PHP 8.1 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:52:14
2
-
PHP 8.1 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:51:44
1
-
PHP 8.1 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:51:14
1
-
PHP 8.1 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:50:54
1
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:50:41
1
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:49:56
1
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:49:23
1
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:48:43
1
-
PHP 8.2.13 / MySQL 5.7 range str_repeat count gc_collect_cycles memory_get_usage
added at:
2024-08-14 07:47:45
1