Skip to content
Development and deployment2 min read

What is PHP?

Short answer

PHP is a server-side programming language for building dynamic web pages. The server runs PHP code on every request, queries the database if needed, and sends the browser finished HTML. WordPress, WooCommerce and Laravel all run on PHP.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. How a PHP request runs
  2. Example
  3. What changed across PHP 8
  4. Settings and errors you’ll meet
  5. On ArabyHost

Rasmus Lerdorf started PHP in 1994, and it grew into the language behind a large share of the web. The reason is simple: upload a .php file and it just runs: no application server to configure and no process to keep alive.

How a PHP request runs

  1. A visitor requests example.com/index.php.
  2. The web server, such as LiteSpeed or Apache, hands the file to the PHP engine.
  3. PHP executes the code and queries the database if needed.
  4. The output (usually HTML) goes back to the browser, and memory is freed when the request ends.

OPcache keeps compiled code in memory so files aren’t re-parsed on every request.

Example

<?php
$name = htmlspecialchars($_GET['name'] ?? 'guest');
echo "<h2>Hello, {$name}</h2>";
echo "<p>PHP version: " . PHP_VERSION . "</p>";

htmlspecialchars stops injected markup (XSS) when you echo user input back to the page.

What changed across PHP 8

Version Headline additions
8.0 JIT compiler, named arguments, the match expression
8.1 Enums, readonly properties
8.2 Readonly classes, a deprecation warning for dynamic properties
8.3 Typed class constants, the json_validate() function

The 8.2 dynamic-properties deprecation is behind many Deprecated notices from older plugins. It doesn’t take the site down, but it’s a sign the plugin needs updating.

Settings and errors you’ll meet

php.ini setting What it controls
memory_limit Maximum memory per request
upload_max_filesize and post_max_size Size of uploaded files
max_execution_time How long a script may run
  • Allowed memory size exhausted: the script went past memory_limit.
  • Parse error: a syntax mistake, usually a missing semicolon or bracket.
  • White screen: a fatal error hidden from visitors; the cause is in the error log. Details on the PHP fatal error page.

On ArabyHost

Hosting plans support PHP 8.1 to 8.3 on LiteSpeed. You can switch versions from cPanel as shown in the PHP version guide and adjust values in php.ini within your account’s resource limits. AI/Developer plans add SSH and Composer for command-line tools such as php artisan. When something breaks, the Araby AI assistant in the panel reads the error log and explains the fix.

FAQ

Which PHP version should I use?

The newest one your site and plugins support. PHP 8.1 no longer receives security updates from the PHP project, so prefer 8.2 or 8.3 for new sites after testing.

Do I need to know PHP to use WordPress?

No, you can run WordPress entirely from its dashboard. Knowing the basics does help you read error messages and edit themes safely.

Why did my site break after changing the PHP version?

Some plugins or older code rely on functions that were removed or changed in newer versions. Switch back, update or replace the plugin, then try again.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.