Setting to disable the "Undefined array index" warning

From: Date: Tue, 15 Feb 2022 12:31:58 +0000
Subject: Setting to disable the "Undefined array index" warning
Groups: php.internals 
Request: Send a blank email to internals+get-117036@lists.php.net to get a copy of this message
Hi, As it is explained in this ticket https://bugs.php.net/bug.php?id=81417 we use to check if a property exists by accessing it directly like we do in JavaScript. Personally, I subscribe to this coding style and we use it all over our codebase (more than 130 000 lines of PHP code). When it became a notice, we disabled them, but now that it is a warning, it is a lot more problematic for us… We can’t even use the last version of PHP Debug for VSCode. As I’m not ready to spend weeks upgrading our codebase because our coding style is not supported by the community, I’m looking at alternatives. The more obvious and simple for me would be to add a setting in php.ini to allow this. So I’d like to know if it is something you would support. If not, I guess I will have to fork PHP, but this will complicate a lot our deployment process and make our code not portable. As I believe we are not the same in this case, I hope you will support the addition of a setting… Thanks in advance for considering this. Best regards, Nicolas

« previous php.internals (#117036) next »