top | item 33908461

(no title)

lazka | 3 years ago

assert() is still broken if it's disabled in php.ini.

discuss

order

nolok|3 years ago

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.

hakre|3 years ago

Yes, that's fully true, but does specifically assert() falls into that category?

hakre|3 years ago

> 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.

lazka|3 years ago

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.