0
$count = 5;
$start = (int)(date('Ymd') . "0");  
$range = range($start, $count);

//Ожидается [201809240,201809241,201809242,201809243,201809244]
var_dump($range);

Но вместо этого вылетаю по памяти

Allowed memory size of 134217728 bytes exhausted (tried to allocate 8589934600 bytes)

1 ответ 1

2

Ошибка в параметрах функции range

http://php.net/manual/ru/function.range.php

$range = range($start, $start + $count);

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.