PHP.net

THE WORLD'S MOST HYPERACTIVE SCRIPTING LANGUAGE!!!

VISITORS:
1,337,420
PHP SCRIPTS RUN:
999,999

🐘PHP🐘

A POPULAR general-purpose scripting language that is ESPECIALLY SUITED to web development.

Fast, flexible and PRAGMATIC, PHP powers EVERYTHING from your blog to the most popular websites in the world!

LATEST!!!
PHP 8.4.14
ChangelogUpgrading
STABLE
PHP 8.3.27
ChangelogUpgrading
OLD BUT GOLD
PHP 8.2.29
ChangelogUpgrading
VINTAGE
PHP 8.1.33
ChangelogUpgrading

🔥 BREAKING NEWS!!! 🔥

24 Oct 2025
PHP 8.4.14 Released! WOW!!!
23 Oct 2025
PHP 8.3.27 Released! AMAZING!!!
23 Oct 2025
PHP 8.5.0 RC 3 available for testing! INCREDIBLE!!!
PHP SERVER TIME
6:18:21 AM
10/29/2025
🐘
ELEPHPANT POWER!!!

The PHP Foundation

The PHP Foundation is a COLLECTIVE of people and organizations united in the mission to ensure the long-term prosperity of the PHP language!

🎉 CONFERENCES!!! 🎉

PHP Conference Kagawa 2025
PHP Conference Fukuoka 2025
PHP Conference Brazil 2025
International PHP Conference Munich 2025

CRAZY STATS!!!

Functions:8,000+
Extensions:200+
Websites:77.5%
Awesomeness:INFINITE!!!
⚡ 🔥 ⚡

WHAT'S NEW IN PHP 8.5!!!

Discover the POWERFUL new features that make PHP 8.5 more EXPRESSIVE, PERFORMANT, and DEVELOPER-FRIENDLY!!!

📋

Clone with

Support for MODIFYING PROPERTIES while cloning objects with a more CONCISE SYNTAX!!!

❌ PHP 8.4 and earlier
final readonly class PhpVersion {
    public function __construct(
        public string $version = 'PHP 8.4',
    ) {}
    
    public function withVersion(
        string $version
    ): self {
        $newObject = clone $this;
        $newObject->version = $version;
        return $newObject;
    }
}

$version = new PhpVersion();
var_dump($version->version);
// string(7) "PHP 8.4"

var_dump($version
    ->withVersion('PHP 8.5')
    ->version);
// Fatal error: Cannot modify 
// readonly property!
✅ PHP 8.5 - SO EASY!!!
final readonly class PhpVersion {
    public function __construct(
        public string $version = 'PHP 8.4',
    ) {}
    
    public function withVersion(
        string $version
    ): self {
        return clone($this, [
            'version' => $version,
        ]);
    }
}

$version = new PhpVersion();
var_dump($version->version);
// string(7) "PHP 8.4"

var_dump($version
    ->withVersion('PHP 8.5')
    ->version);
// string(7) "PHP 8.5" ✨

var_dump($version->version);
// string(7) "PHP 8.4"

🎉 BENEFITS: This new syntax allows modifying properties during cloning without requiring additional steps, making working with readonly classes more INTUITIVE and less ERROR-PRONE!!!

🚰

Pipe Operator

The Pipe operator provides a more READABLE WAY to chain function calls by passing the result of one expression as the first argument to the next function!!!

❌ PHP 8.4 - SO NESTED!!!
$input = ' Some kind of string. ';

$output = strtolower(
    str_replace(['.', '/', '…'], '',
        str_replace(' ', '-', 
            trim($input)
        )
    )
);

var_dump($output);
// string(19) "some-kind-of-string"

// SO CONFUSING!!! 😵
✅ PHP 8.5 - CRYSTAL CLEAR!!!
$input = ' Some kind of string. ';

$output = $input
    |> trim(...)
    |> (fn($string) => 
        str_replace(' ', '-', $string))
    |> (fn($string) => 
        str_replace(['.', '/', '…'], '', 
        $string))
    |> strtolower(...);

var_dump($output);
// string(19) "some-kind-of-string"

// SO READABLE!!! 🎉

🚀 BENEFITS: The Pipe operator makes code more READABLE and easier to understand by clearly showing the data flow from one operation to the next, reducing NESTED FUNCTION CALLS!!!

⚠️

New #[\NoDiscard] Attribute

The #[\NoDiscard] attribute ensures that the return value of a function is either USED or INTENTIONALLY IGNORED, helping prevent BUGS where return values are accidentally ignored!!!

❌ PHP 8.4 - NO WARNINGS!!!
function getPhpVersion(): string {
    return 'PHP 8.4';
}

getPhpVersion(); 
// No Errors - But you forgot 
// to use the return value!!! 😱

// DANGEROUS!!!
✅ PHP 8.5 - SAFETY FIRST!!!
#[\NoDiscard]
function getPhpVersion(): string {
    return 'PHP 8.5';
}

getPhpVersion();
// Warning: The return value of 
// function getPhpVersion() should 
// either be used or intentionally 
// ignored by casting it as (void)

// SAFE!!! 🛡️

🛡️ BENEFITS: This attribute helps catch potential BUGS where function return values are accidentally ignored, improving code RELIABILITY and MAINTAINABILITY!!!

🌐

New URI Extension

RFC 3986 and WHATWG URL compliant API with new classes like Uri\Rfc3986\Uri and Uri\WhatWg\Url!!!

📊

array_first() & array_last()

Simplified array element retrieval with new BUILT-IN FUNCTIONS for common operations!!! Finally!!!

Additional Enhancements

Property Promotion for final classes, Attributes for constants, #[\Override] for properties, and MORE!!!

🎊 🎉 🎊 🎉 🎊

PHP 8.5 IS COMING SOON!!!

Get ready for the MOST EXCITING PHP release EVER!!!

🐘 🐘 🐘

PHP.NET - THE MOST EXCITING WEBSITE ON THE INTERNET!!!

© 2025 The PHP Group • All Rights Reserved • Powered by PURE PHP ENERGY!!!

X: @official_php@phpfoundation.orgin: @phpnet