What is PHP track_errors?
Asked Answered
H

1

9

I was just glancing through my Cpanel's php.ini EZConfig (basically php.ini; it just allows me to change some settings in php.ini through Cpanel) and noticed track_errors.

Can someone tell me what this means, I have searched the php website and Google and cannot find out what it means exactly?

Herophilus answered 5/9, 2010 at 23:8 Comment(0)
H
21

Search for "track_errors PHP".

https://www.php.net/manual/en/errorfunc.configuration.php#ini.track-errors

If enabled, the last error message will always be present in the variable $php_errormsg.

Hailstone answered 5/9, 2010 at 23:10 Comment(7)
Thanks! I did honestly do a search and found nothing. Thank youHerophilus
This feature has been DEPRECATED as of PHP 7.2.0.Fructiferous
@DavidRefoua that is hilarious. I have just found track errors and just thought it could be useful ... and it is gone. Such is life.Marji
@Marji I see what you mean, but considering there are other (and dare I say even superior) features such as set_error_handler() that can basically track the same thing safely, it's no wonder that the PHP team decided `track_errors_ was redundant ¯_(ツ)_/¯Fructiferous
@Marji BTW, you might want to use this, instead ✌️Fructiferous
What is the alternative of this ? i can see that $php_errormsg is used in many files.Helbona
More than eleven years into the future, I do search for "track_errors php.ini" – and I find this post.Succedaneum

© 2022 - 2024 — McMap. All rights reserved.