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.

PHP

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.

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

WordPress wp-admin redirects to HTTPS

Updated 18th May 2021

Does your WordPress wp-admin redirect to https rather than http? Below is a simple tutorial to stop this from happening. First, check the siteurl in the wp_options table within your database. Make sure the option_value is your site address with http:// not https://. If your siteurl is set as http:// the try the following. Open

How to check Composer version – Install and use Composer for PHP

Updated 11th January 2024

Composer is a dependency manager for PHP. First released in 2012, Composer, and its adoption by popular frameworks such as Laravel has single-handedly driven the rise in PHP adoption in recent years. In this post, I will show you how to install and use Composer. How to install Composer To get started, download Composer from