PHPParseFunctionError
Less than 1 minute
PHPParseFunctionError
Exception thrown when a PHP function parse error occurs.
class PHPParseFunctionError extends \Hazaar\Parser\Exception\PHPParserErrorThis exception is used to indicate that a specific function or token was expected during PHP parsing, but was not found, resulting in a parse error. The expected token is provided for diagnostic purposes. Optionally, a previous exception and error code can be included for chaining and error handling.
Properties
expected
The expected function or token that caused the parse error.
private string $expectedMethods
__construct
Constructs a new PHPParseFunctionError exception.
public __construct(string $expected, ?\Throwable $previous, int $code = 500): voidParameters
| Parameter | Type | Description |
|---|---|---|
$expected | string | the expected function or token |
$previous | \Throwable | optional previous exception for chaining |
$code | int | the error code (default 500) |
__toString
Returns a string representation of the parse error, including the expected token and previous exception if present.
public __toString(): stringGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000