Exceptions give parse error!!
Posted: Mon Jul 03, 2006 2:05 pm
... I can't even run the example code from php.net:
Entire file:
Entire file:
Code: Select all
<?php
try {
$error = 'Always throw this error';
throw new Exception($error);
// Code following an exception is not executed.
echo 'Never executed';
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
// Continue execution
echo 'Hello World';
?>I have php 4.3.11Parse error: parse error, unexpected '{' in /path/to/ex.php on line 2