In this article we are discussing error reporting in php and we also discuss why error reporting is important during development and why it is important to turn it off.
for example:
<?php
echo $var = "pan "
$var2 = "pan2";
?>
In this example i missing the line terminator or $var which is a semi colon. At that moment my error reporting is off. So if i run this code nothing has to be return no error and no output. This is because of error reporting off.
So we have to go to the php.ini file located in php folder and find error_reporting and modified its value by 0 to E_ALL and then save the file and restart Apache server. And then if we refresh our output page the it will show an parse error.
No comments:
Post a Comment