Early Access Program

PhpStorm 2024.3 Early Access Program Is Now Open

We’re opening the Early Access Program (EAP) for the PhpStorm 2024.3 that will have native support of PHP 8.4. Join the program and try out some of the newest additions and improvements today!

New classes without parentheses

PHP 8.4 introduces a new syntax improvement allowing instantiation of classes without parentheses. PhpStorm now fully supports this feature, making it easier for developers to adopt this cleaner, more concise syntax.

Before:

$request = (new Request())->withMethod('GET')->withUri('/hello-world');

After:

$request = new Request()->withMethod('GET')->withUri('/hello-world');

This automatic conversion makes it faster to upgrade existing code to PHP 8.4’s new syntax style.

New array functions

Another exciting addition in PHP 8.4 is a set of new array functions: array_find(), array_find_key(), array_any(), and array_all(). PhpStorm now offers inspections that can identify foreach loops in your code and automatically suggest replacements with the new array functions. This helps you modernize your code with minimal effort.

array_find

Before:

function a(array $array, callable $callback): mixed {
    foreach ($array as $key => $value) {
        if ($callback($value, $key)) {
            return $value;
        }
    }
    return null;
}

After:

function a(array $array, callable $callback): mixed {
    return array_find($array, function ($value, $key) use ($callback) {
        return $callback($value, $key);
    });
}

array_find_key

Before:

function a(array $array, callable $callback): mixed {
    foreach ($array as $key => $value) {
        if ($callback($value, $key)) {
            return $key;
        }
    }
    return null;
}

After:

function a(array $array, callable $callback): mixed {
    return array_find_key($array, function ($value, $key) use ($callback) {
        return $callback($value, $key);
    });
}

array_any

Before:

function a(array $array, callable $callback): mixed {
    foreach ($array as $key => $value) {
        if ($callback($value, $key)) {
            return true;
        }
    }
    return false;
}

After:

function a(array $array, callable $callback): mixed {
    return array_any($array, function ($value, $key) use ($callback) {
        return $callback($value, $key);
    });
}

array_all

Before:

function a(array $array, callable $callback): mixed {
    foreach ($array as $key => $value) {
        if ($callback($value, $key)) {
            return false;
        }
    }
    return true;
}

After:

function a(array $array, callable $callback): mixed {
    return array_all($array, function ($value, $key) use ($callback) {
        return !$callback($value, $key);
    });
}

Property hooks support

We’ve added support for the new property hooks introduced in PHP 8.4. You now get proper keyword completion and error highlighting with relevant quick fix suggestions.

<?php

class User
{
    public string $name {
        set {
            $this->name = $value;
        }
        get {
            return $this->name;
        }
    }
}

$user = new User();
$user->name = 'foo';
var_dump($user->name);

With these new features, PhpStorm continues to provide top-tier support for the latest PHP improvements, ensuring a more streamlined and efficient development experience.


About Early Access Program (EAP)

If you’re not familiar with how our Early Access Program (EAP) operates, here’s a quick overview:

  1. We release new EAP builds weekly, giving you a sneak peek at upcoming features.
  2. EAP builds are completely free to use and do not require a license.
  3. You can install the EAP version alongside your stable PhpStorm installation, so there’s no need to uninstall your current version.
  4. The most convenient way to access EAP builds and keep both your stable and EAP versions up-to-date is by using our Toolbox App.
  5. Alternatively, you can download EAP builds from the EAP page or set up your IDE to automatically receive updates by selecting Check IDE Updates for the Early Access Program under Settings/Preferences | Appearance & Behavior | System Settings | Updates.
image description