Your Location is: Home > Php

How to get PHP syntax error to display a complete message with file name and line number?

From: Papua-Neuguinea View: 4613 George 


I'm working on converting some old PHP code from version 5.6 to 7.3. I had a syntax error and the message I got was:

[14-Nov-2020 11:33:16 America/Los_Angeles] syntax error, unexpected '=', expecting ')'

which gives no clue as to where the error was. In this case I was able to switch back to 5.6 which give the complete information. So how do I get PHP 7.3 to give the complete error message, like 5.6? I tried Googling this problem, but could not find any mention of it, perhaps it's some kind of .ini setting?

Best answer