Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 85 additions & 1 deletion include/errors.inc
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,13 @@ function is_known_term (string $term): ?string {
'==' => 'language.operators.comparison.php',
'===' => 'language.operators.comparison.php',
'@' => 'language.operators.errorcontrol.php',
'__halt_compiler' => 'function.halt-compiler.php',
'__PHP_Incomplete_Class' => 'function.unserialize.php',
'and' => 'language.operators.logical.php',
'apache' => 'install.php',
'array' => 'language.types.array.php',
'arrays' => 'language.types.array.php',
'as' => 'control-structures.foreach.php',
'case' => 'control-structures.switch.php',
'catch' => 'language.exceptions.php',
'checkbox' => 'faq.html.php',
Expand All @@ -400,9 +404,19 @@ function is_known_term (string $term): ?string {
'closures' => 'functions.anonymous.php',
'cookie' => 'features.cookies.php',
'date' => 'function.date.php',
'default' => 'control-structures.switch.php',
'do' => 'control-structures.do.while.php',
'enddeclare' => 'control-structures.declare.php',
'endfor' => 'control-structures.alternative-syntax.php',
'endforeach' => 'control-structures.alternative-syntax.php',
'endif' => 'control-structures.alternative-syntax.php',
'endswitch' => 'control-structures.alternative-syntax.php',
'endwhile' => 'control-structures.alternative-syntax.php',
'exception' => 'language.exceptions.php',
'extends' => 'language.oop5.basic.php#language.oop5.basic.extends',
'false' => 'language.types.boolean.php',
'file' => 'function.file.php',
'final' => 'language.oop5.final.php',
'finally' => 'language.exceptions.php',
'fopen' => 'function.fopen.php',
'for' => 'control-structures.for.php',
Expand All @@ -416,34 +430,42 @@ function is_known_term (string $term): ?string {
'globals' => 'language.variables.scope.php',
'header' => 'function.header.php',
'heredoc' => 'language.types.string.php#language.types.string.syntax.heredoc',
'nowdoc' => 'language.types.string.php#language.types.string.syntax.nowdoc',
'htaccess' => 'configuration.file.php',
'if' => 'control-structures.if.php',
'implements' => 'language.oop5.interfaces.php',
'include' => 'function.include.php',
'insteadof' => 'language.oop5.traits.php#language.oop5.traits.conflict',
'int' => 'language.types.integer.php',
'ip' => 'reserved.variables.server.php',
'iterable' => 'language.types.iterable.php',
'juggling' => 'language.types.type-juggling.php',
'location' => 'function.header.php',
'mail' => 'function.mail.php',
'mixed' => 'language.types.mixed.php',
'modulo' => 'language.operators.arithmetic.php',
'mysql' => 'mysql.php',
'never' => 'language.types.never.php',
'new' => 'language.oop5.basic.php#language.oop5.basic.new',
'nowdoc' => 'language.types.string.php#language.types.string.syntax.nowdoc',
'null' => 'language.types.null.php',
'numeric' => 'reserved.other-reserved-words.php',
'object' => 'language.types.object.php',
'operator' => 'language.operators.php',
'operators' => 'language.operators.php',
'or' => 'language.operators.logical.php',
'parent' => 'reserved.classes.php#reserved.classes.special',
'php.ini' => 'configuration.file.php',
'php-mysql.dll' => 'book.mysql.php',
'php-self' => 'reserved.variables.server.php',
'query-string' => 'reserved.variables.server.php',
'readonly' => 'language.oop5.properties.php#language.oop5.properties.readonly-properties',
'redirect' => 'function.header.php',
'reference' => 'index.php',
'referer' => 'reserved.variables.server.php',
'referrer' => 'reserved.variables.server.php',
'remote-addr' => 'reserved.variables.server.php',
'request' => 'reserved.variables.request.php',
'self' => 'reserved.classes.php#reserved.classes.special',
'session' => 'features.sessions.php',
'smtp' => 'book.mail.php',
'ssl' => 'book.openssl.php',
Expand All @@ -454,8 +476,70 @@ function is_known_term (string $term): ?string {
'superglobals' => 'language.variables.superglobals.php',
'switch' => 'control-structures.switch.php',
'timestamp' => 'function.time.php',
'true' => 'language.types.boolean.php',
'try' => 'language.exceptions.php',
'upload' => 'features.file-upload.php',
'use' => 'language.namespaces.php',
'void' => 'language.types.void.php',
'xor' => 'language.operators.logical.php',
'yield from' => 'language.generators.syntax.php#control-structures.yield.from',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are spaces allowed in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'yield' => 'language.generators.syntax.php#control-structures.yield',

'__COMPILER_HALT_OFFSET__' => 'function.halt-compiler.php',
'DEFAULT_INCLUDE_PATH' => 'reserved.constants.php',
'E_ALL' => 'errorfunc.constants.php',
'E_COMPILE_ERROR' => 'errorfunc.constants.php',
'E_COMPILE_WARNING' => 'errorfunc.constants.php',
'E_CORE_ERROR' => 'errorfunc.constants.php',
'E_CORE_WARNING' => 'errorfunc.constants.php',
'E_DEPRECATED' => 'errorfunc.constants.php',
'E_ERROR' => 'errorfunc.constants.php',
'E_NOTICE' => 'errorfunc.constants.php',
'E_PARSE' => 'errorfunc.constants.php',
'E_RECOVERABLE_ERROR' => 'errorfunc.constants.php',
'E_STRICT' => 'errorfunc.constants.php',
'E_USER_DEPRECATED' => 'errorfunc.constants.php',
'E_USER_ERROR' => 'errorfunc.constants.php',
'E_USER_NOTICE' => 'errorfunc.constants.php',
'E_USER_WARNING' => 'errorfunc.constants.php',
'E_WARNING' => 'errorfunc.constants.php',
'PEAR_EXTENSION_DIR' => 'reserved.constants.php',
'PEAR_INSTALL_DIR' => 'reserved.constants.php',
'PHP_BINARY' => 'reserved.constants.php',
'PHP_BINDIR' => 'reserved.constants.php',
'PHP_CONFIG_FILE_PATH' => 'reserved.constants.php',
'PHP_CONFIG_FILE_SCAN_DIR' => 'reserved.constants.php',
'PHP_DATADIR' => 'reserved.constants.php',
'PHP_DEBUG' => 'reserved.constants.php',
'PHP_EOL' => 'reserved.constants.php',
'PHP_EXTENSION_DIR' => 'reserved.constants.php',
'PHP_EXTRA_VERSION' => 'reserved.constants.php',
'PHP_FD_SETSIZE' => 'reserved.constants.php',
'PHP_FLOAT_DIG' => 'reserved.constants.php',
'PHP_FLOAT_EPSILON' => 'reserved.constants.php',
'PHP_FLOAT_MAX' => 'reserved.constants.php',
'PHP_FLOAT_MIN' => 'reserved.constants.php',
'PHP_INT_MAX' => 'reserved.constants.php',
'PHP_INT_MIN' => 'reserved.constants.php',
'PHP_INT_SIZE' => 'reserved.constants.php',
'PHP_LIBDIR' => 'reserved.constants.php',
'PHP_LOCALSTATEDIR' => 'reserved.constants.php',
'PHP_MAJOR_VERSION' => 'reserved.constants.php',
'PHP_MANDIR' => 'reserved.constants.php',
'PHP_MAXPATHLEN' => 'reserved.constants.php',
'PHP_MINOR_VERSION' => 'reserved.constants.php',
'PHP_OS_FAMILY' => 'reserved.constants.php',
'PHP_OS' => 'reserved.constants.php',
'PHP_PREFIX' => 'reserved.constants.php',
'PHP_RELEASE_VERSION' => 'reserved.constants.php',
'PHP_SAPI' => 'reserved.constants.php',
'PHP_SHLIB_SUFFIX' => 'reserved.constants.php',
'PHP_SYSCONFDIR' => 'reserved.constants.php',
'PHP_VERSION_ID' => 'reserved.constants.php',
'PHP_VERSION' => 'reserved.constants.php',
'PHP_WINDOWS_EVENT_CTRL_BREAK' => 'reserved.constants.php',
'PHP_WINDOWS_EVENT_CTRL_C' => 'reserved.constants.php',
'PHP_ZTS' => 'reserved.constants.php',
];

return $terms[$term] ?? null;
Expand Down