PHP.mk документација

ParseError

Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.

class.parseerror.php PHP.net прокси Преводот е вчитан
Оригинал на PHP.net
Патека class.parseerror.php Локална патека за оваа страница.
Извор php.net/manual/en Оригиналниот HTML се реупотребува и локално се стилизира.
Режим Прокси + преведен приказ Кодовите, табелите и белешките остануваат читливи во истиот тек.
ParseError

Референца за `class.parseerror.php` со подобрена типографија и навигација.

class.parseerror.php

ParseError

Интерфејсот SessionUpdateTimestampHandlerInterface

Вовед

ParseError се фрла кога ќе настане грешка при парсирање на PHP код, како на пример кога eval() се повикува.

Забелешка: ParseError extends CompileError од PHP 7.3.0. Претходно, го прошируваше Грешка.

Синопсис на класата

class ParseError extends CompileError {
/* Наследени својства */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
/* Наследени методи */
public Error::__construct(string $message = "", int $code = 0, ?Проверува тврдење $previous = null)
final public Error::getMessage(): string
final public Error::getCode(): int
final public Error::getFile(): string
final public Error::getLine(): int
final public Error::getTrace(): array
private Error::__clone(): void
}

Белешки од корисници 2 забелешки

SixPigPigWikiSix
3 години пред
The priority of Parse Error should be higher than that of Fatal Error,Parse Error, which has the highest priority among all PHP exceptions. See the following example:
<?php
error_reporting(E_ALL);
test()
//System output a parse error
?>
<?php
error_reporting(E_WARNING);
test()
//System output a parse error
?>
<?php
error_reporting(E_ERROR);
test()
//System output a parse error
?>
<?php
error_reporting(E_PARSE);
test()
//System output a parse error
?>
andrijan dot test dot rabota na gmail dot com
пред 6 години
<?php
/*
* The function eval() evaluate his argument as an instruction PHP
* Then the argument must respect the standar of PHP codage
* In this example the semicolon are missign
*/

try{

    eval("echo 'toto' echo 'tata'");

}catch(ParseError $p){

    echo $p->getMessage();
}

/*
* If you run this code the result is different of the result of above code
* PHP will output the standar parse Error: syntax error, ....
*

eval("echo 'toto' echo 'tata'");

*/
На оваа страница

Автоматски outline од активната документација.

Насловите ќе се појават тука по вчитување.

Попрегледно читање

Примерите, changelog табелите и user notes се визуелно издвоени за да не се губат во долгата содржина.

Брз совет Користи го outline-от Скокни директно на главните секции од активната страница.
Извор Оригиналниот линк останува достапен Кога ти треба целосен upstream context, отвори го PHP.net во нов tab.