Disable xdebug.scream while lexing

This commit is contained in:
nikic 2014-04-19 22:26:05 +02:00
parent 8429157ab5
commit 5960ecfc10

View File

@ -30,10 +30,14 @@ class PHPParser_Lexer
* @throws PHPParser_Error on lexing errors (unterminated comment or unexpected character)
*/
public function startLexing($code) {
$scream = ini_set('xdebug.scream', 0);
$this->resetErrors();
$this->tokens = @token_get_all($code);
$this->handleErrors();
ini_set('xdebug.scream', $scream);
$this->code = $code; // keep the code around for __halt_compiler() handling
$this->pos = -1;
$this->line = 1;