PHP compilation error

WBOY
Release: 2023-09-01 16:54:02
forward
1204 people have browsed it

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
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!