Closed mihdan closed 4 years ago
А откуда она там берется ошибка?
Я так понял, что из-за нехватки ресурсов (места)
Не знаю, нужно думать. Вариант может token_get_all
, но совсем не хочется открывать файл и парсить его предварительно, ведь у нас счет на миллисекунды...
Скорее всего ты прав, так как простого способа нет проверить перед подключением
Мне кажется можно это сделать через opcache_compile_file
ктонибудь проверьте.
Hello, I have encountered this issue too. I believe the cache file was being written and somehow it stopped. I can upload relevant files/screenshots if needed. Has anyone found a solution for this?
I think that we should check the file for syntax errors after it's written and then allow it for usage.
php_check_syntax()
Can we have a test on this, people?
Thank you!
php_check_syntax
was removed not added in 5.0.5, I misread < and >.
We're back to where we were with this one.
Other options:
token_get_all
I think I'd try token_get_all
next, actually.
token_get_all
gobbles up anything we give it, unfortunately.
Here's another thing, what if we write a special flag into the file like /** POMODORO_END */
and make sure it exists? That would prevent partial files from being loaded.
If that does not cover the majority of cases (or even all cases of syntax errors, what else can there be), then we can use token_get_all
and make sure that there's one array, of key-strings, closed off properly.
@soulseekah их можно валидировать перед подключением?