PHP VERSION: 8.2.18

throwable_interface_parse_error_include.php

<?php
// throwable interface: ParseError

try {
    include 
"this_code_has_issues.php";
} catch (
\ParseError $error) {
    
// Handle $error
    
echo 'Sorry ... parse error';
}
echo 
PHP_EOL;

Output


Sorry ... parse error
SOURCE CODE