zlacker

[parent] [thread] 7 comments
1. nathel+(OP)[view] [source] 2022-12-08 13:38:17
Is there still a php.ini that allows you to alter the language’s semantics? To me, that’s the biggest can of worms that PHP used to have. I haven’t touched it in years, so am not up to date.
replies(2): >>trilli+z1 >>nolok+52
2. trilli+z1[view] [source] 2022-12-08 13:46:32
>>nathel+(OP)
Yes. Looks like the canonical use if for ENV vars though?

https://www.php.net/manual/en/configuration.file.php

3. nolok+52[view] [source] 2022-12-08 13:48:53
>>nathel+(OP)
Not really. You have a php.ini that can configure some behavior, but most of what was horrible is either deprecated or straight up removed (register globals, ...)
replies(1): >>lazka+Ib
◧◩
4. lazka+Ib[view] [source] [discussion] 2022-12-08 14:55:01
>>nolok+52
assert() is still broken if it's disabled in php.ini.
replies(2): >>nolok+2S >>hakre+0v6
◧◩◪
5. nolok+2S[view] [source] [discussion] 2022-12-08 18:12:35
>>lazka+Ib
I mean yes php.ini allows you to disable any function you want, and if you do that then this function doesn't work like expected, I can hardly blame php for that.
replies(1): >>hakre+ev6
◧◩◪
6. hakre+0v6[view] [source] [discussion] 2022-12-10 14:07:27
>>lazka+Ib
> assert() is still broken if it's disabled in php.ini.

Care to explain what you mean it's broken if disabled? That it is disabled (noop in runtime) so you're missing it? AFAIK that's the production setting. You should be able to enable it in build/test/ci/development, just how you want it.

replies(1): >>lazka+sQ7
◧◩◪◨
7. hakre+ev6[view] [source] [discussion] 2022-12-10 14:08:50
>>nolok+2S
Yes, that's fully true, but does specifically assert() falls into that category?
◧◩◪◨
8. lazka+sQ7[view] [source] [discussion] 2022-12-10 22:52:30
>>hakre+0v6
Sure. (1) it is a global setting so I can't decide if I want it on a per application basis, with Docker that is less of an issue though (2) it is disabled by default, so hardly anyone uses it from what I see (3) I'd like to have it always enabled, also in production, so my code doesn't end up in states that I didn't expect and I get notified.

But that might just be me and/or my particular use case.

[go to top]