Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Are there any differences between php 7.0 and 7.1 when handling undefined variables?

12 views
Skip to first unread message

harriett...@gmail.com

unread,
Mar 27, 2018, 3:43:19 PM3/27/18
to
I have a php app that's been working for months. Then all of a sudden it starts to render Internal Server 500 errors when encountering undefined variables in code. I had to use isset() to check the variables first.

I also found that the app server is installed with two versions of PHP - 7.0 and 7.1. There are two handlers mapped to *.php files. When I run phpinfo(), it's version 7.1 info displays. I wonder if there is any differences between how version 7.0 and 7.1 handle undefined new variables.

Any ideas? Many thanks.

Angel

unread,
Jun 29, 2022, 1:01:30 PM6/29/22
to
Always add a value to a variable. Do not leave a variable undefined, it can produce serious problems running the app.
0 new messages