What is the Lexing stage in PHP

By Dillon Smart · · · 1 Comments

Lexing is a phase the PHP interpreter undergoes while interpreting the source code written.

Lexing, is the first of four overall steps performed by the PHP interpreter.

Steps in the PHP Interpreter

The PHP interpreter undergoes a total of four steps before executing the code written.

  • Lexing
  • Parsing
  • Compilation
  • Interpretation

What is Lexing in PHP

Lexical analysis, also known as tokenizing, it is a phase that consists of converting a string of characters from source code written in PHP into a sequence of tokens that describe what each subsequent encountered value means.


1 Comment

PHP Numeric Literal Separator - IKnowThatNow

[…] I wrote an post which explains more about the Lexing stage in PHP. […]

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Laravel 419 page expired after login [SOLVED]

Updated 1st January 2024

Laravel is the most popular PHP framework, dominating the space since 2014, and the chosen framework by many new PHP developers. Many new developers run into the same errors when first using the framework, the most common being a 419 Page Expired error on a form post.  What is Cross-Site Request Forgery (CSRF)? Cross-site request

PHP Variable Variables

Updated 1st June 2022

In PHP, it is sometimes necessary to have variables that have variable names. Traditionally, a variable is given a name and a value is given to the variable like so: $foo = 'bar'; A Variable Variable, or Double Dollar Variable, gets its name from the value of another variable like so: $foo = 'bar'; $$foo

Laravel – Specified key was too long Error

Updated 18th May 2021

With Laravel 5.4, some users may be hit with the Laravel Specified key was too long Error when migrating the database. This is because in the latest Laravel update, the developers made changes to the default database charset, making it utf8mb4. If your using MySQL 5.7.7 or higher, you won’t encounter this issue, however older versions of MySQL