note 125536 deleted from class.parseerror by cmb
| From: | cmb@php.net | Date: | Mon, 23 Nov 2020 12:54:22 +0000 |
| Subject: | note 125536 deleted from class.parseerror by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215888@lists.php.net to get a copy of this message | ||
Note Submitter: info at selbstlernportal dot de
----
The call of a php script containing syntax errors results in a blank page. Add this snippet to your
main script or a test script during development:
<?php
try {
require_once 'myFaultyScript.php';
} catch (ParseError $p) {
echo $p->getMessage().' in file '.basename($p->getFile()).' line
'.$p->getLine();
}
?>