Home  >  Article  >  Backend Development  >  PHP compilation error

PHP compilation error

WBOY
WBOYforward
2023-09-01 16:53:021223browse

PHP 编译错误

Introduction

Starting with PHP 7.3, the CompileError exception was added. This class inherits the Error class. Certain error conditions that previously resulted in fatal errors now raise CompileError. This affects compilation errors that may be thrown by the token_get_all() function.

token_get_all() The function uses the Zend lexical scanner to parse the given string into PHP language tokens.

Syntax

token_get_all ( string $source [, int $flags = 0 ] ) : array

Parameters

Sr.No Parameters and description
1 Source

PHP source to parse

2 Flags

TOKEN_PARSE - Identifies the ability to use a reserved word in a specific context.

This function should be used in TOKEN_PARSE mode to be able to raise CompileError.

The above is the detailed content of PHP compilation error. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete