E
E
eazygem2018-04-17 09:30:05
PHP
eazygem, 2018-04-17 09:30:05

Why does PHP react differently to errors on hosting and local server?

Developed a website in YII2 on a local server OpenServer (PHP 5.6). When I finished development, I started uploading it to hosting (PHP 5.6.34). I uploaded it, set it up, but errors began to appear on most pages. Basically they were that I was using a non-existent variable:
5ad592e795aef775492639.png
However, on local hosting, in this case, PHP simply continued the script (it returned false in the condition).
There were also errors like "Non-static method".
What could be the reason for this difference in PHP behavior? Hosted display_errors - Off.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question