PHP: Hypertext PreprocessorPHP 8.3.0 RC 3 available for testing (28.9.2023, 00:00 UTC)
The PHP team is pleased to announce the release of PHP 8.3.0, RC 3. This is the third release candidate, continuing the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0, RC 3 please visit the download page. Please carefully test this version and report any issues found in the bug reporting system. Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be the fourth release candidate (RC 4), planned for 12 October 2023. The signatures for the release can be found in the manifest or on the QA site. Thank you for helping us make PHP better.
Link
PHP: Hypertext PreprocessorPHP 8.3.0 RC 2 available for testing (14.9.2023, 00:00 UTC)
The PHP team is pleased to announce the release of PHP 8.3.0, RC 2. This is the second release candidate, continuing the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0, RC 2 please visit the download page. Please carefully test this version and report any issues found in the bug reporting system. Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be the third release candidate (RC 3), planned for 28 September 2023. The signatures for the release can be found in the manifest or on the QA site. Thank you for helping us make PHP better.
Link
Derick RethansXdebug Update: August 2023 (12.9.2023, 08:27 UTC)

Xdebug Update: August 2023

In this monthly update I explain what happened with Xdebug development in the past month. These are normally published on the first Tuesday on or after the 5th of each month.

Patreon and GitHub supporters will get it earlier, around the first of each month.

You can become a patron or support me through GitHub Sponsors. I am currently 36% towards my $2,500 per month goal, which is set to allow continued maintenance of Xdebug.

If you are leading a team or company, then it is also possible to support Xdebug through a subscription.

In the last month, I spend around 27 hours on Xdebug, with 32 hours funded.

Towards Xdebug 3.3

In August I mostly spent my time on improving Xdebug's xdebug_get_function_stack() function and stack traces with regard to chained exceptions.

A feature request asked whether it would be possible to add the local variables for each stack frame that is returned with the xdebug_get_function_stack() function. Xdebug can already show local variables for the top most frame when it shows stack traces (through the xdebug.show_local_vars setting), but the function's result don't include them.

When implementing this feature, I noticed that arguments were being returned as strings, instead of actual values, as part of each stack frame. I created an issue for that and implemented that as well.

When the original requester tried out the new feature, it turned out that he wanted to do this in a user-defined exception handler. However, at that stage, the original stack has been destroyed, and Xdebug no longer could access that information.

To work around this, I now cache the stack when an exception gets thrown so that the cached version then can be requested when calling xdebug_get_function_stack() with the new from_exception option.

That looks like:

<?php
class Handlers
{
    function __construct(private string $title, private float $PIE) {}

    static function exceptionHandler($exception)
    {
        $s = xdebug_get_function_stack( [ 'from_exception' => $exception ] );
        var_dump($s);
    }
}

class Error_Entry
{
    public function __construct($base, $errno)
    {
        throw new Exception();
    }
}

set_exception_handler(['Handlers', 'exceptionHandler']);
$e = new Error_Entry(1, 2);

?>

Xdebug's cache is eight items big, which allows for 8 rethrown/chained exception stacks to be remembered.

Because of this cache it was now also (finally) possible to resolve issue #450 and issue #476. This now means that chained and rethrown exceptions are now displayed when Xdebug shows a stack trace, whether it is on the CLI, or in an HTML context.

Over the next few months I will continue to work on the features and issues on the 3.3 roadmap, without any guarantees these tickets will be implemented.

If you have comments, suggestions, or if your company wants to help fund features, please reach out, or leave comments on the document.

Xdebug Videos

I have published one new videos in the last month:

Let me know what you'd like to see!

You can find all previous videos on my YouTube channel.

Business Supporter Scheme and Funding

In the last few months, two new business supporters signed u

Truncated by Planet PHP, read more at the original (another 1631 bytes)

Link
PHP: Hypertext PreprocessorPHP 8.3.0 RC 1 available for testing (31.8.2023, 00:00 UTC)
The PHP team is pleased to announce the release of PHP 8.3.0, RC 1. This is the first release candidate, continuing the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0, RC 1 please visit the download page. Please carefully test this version and report any issues found in the bug reporting system. Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be the second release candidate (RC 2), planned for 14 September 2023. The signatures for the release can be found in the manifest or on the QA site. Thank you for helping us make PHP better.
Link
PHP: Hypertext PreprocessorPHP 8.3.0 Beta 3 available for testing (17.8.2023, 00:00 UTC)
The PHP team is pleased to announce the third beta release of PHP 8.3.0, Beta 3. This continues the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0 Beta 3 please visit the download page.Please carefully test this version and report any issues found in the bug reporting system.Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be RC 1, planned for Aug 31 2023.The signatures for the release can be found in the manifest or on the QA site.Thank you for helping us make PHP better.
Link
Derick RethansXdebug Update: July 2023 (8.8.2023, 08:52 UTC)

Xdebug Update: July 2023

In this monthly update I explain what happened with Xdebug development in this past two months. These are normally published on the first Tuesday on or after the 5th of each month.

Patreon and GitHub supporters will get it earlier, around the first of each month.

You can become a patron or support me through GitHub Sponsors. I am currently 37% towards my $2,500 per month goal, which is set to allow continued maintenance of Xdebug.

If you are leading a team or company, then it is also possible to support Xdebug through a subscription.

In the last month, I spend around 15 hours on Xdebug, with 25 hours funded. This is much less than I wanted, but instead I have been busy implementing features for PHP.

Towards Xdebug 3.3

I have been keeping up with changes in PHP 8.3's development, and had to adjust some tests as PHP has changed a few things, making my expected results incorrect.

I also fixed a number of crash bugs, resulting in the release of Xdebug 3.2.2 early in the month.

Now PHP 8.3 has its first beta release, it is soon time to make an alpha release of Xdebug so that it can be installed through PECL, instead of by having to checkout the Git repository by hand.

Over the next few months I will continue to work on the features and issues on the 3.3 roadmap, without any guarantees these tickets will be implemented.

If you have comments, suggestions, or if your company wants to help fund features, please reach out, or leave comments on the document.

Xdebug Videos

I have published no new videos in the last few months.

Let me know what you'd like to see!

You can find all previous videos on my YouTube channel.

Business Supporter Scheme and Funding

In the last few months, no new business supporters signed up.

Some of the supporters that I reached out to, have supplied their logos, making the front page less bland.

If you, or your company, would also like to support Xdebug, head over to the support page!

Besides business support, I also maintain a Patreon page, a profile on GitHub sponsors, as well as an OpenCollective organisation.

Xdebug Cloud

Xdebug Cloud is the Proxy As A Service platform to allow for debugging in more scenarios, where it is hard, or impossible, to have Xdebug make a connection to the IDE. It is continuing to operate as Beta release.

Packages start at £49/month, and I have recently introduced a package for larger companies. This has a larger initial set of tokens, and discounted extra tokens.

If you want to be kept up to date with Xdebug Cloud, please sign up to the mailinglist, which I will use to send out an update not more than once a month.

Become a Patron!
Link
Derick RethansConcealed Code (3.8.2023, 08:55 UTC)

Concealed Code

Last week, the author of the PHP Debug Adapter for Visual Studio Code asked me to look at an issue. A user noticed that configured breakpoints in the editor would be greyed out for any request besides the first one for each process when using PHP's built-in web server.

Xdebug "resolves" breakpoints when it sees code compiled by PHP and then notifies IDEs that the configured breakpoints are valid. Sometimes it also means it moves them to a line with executable code on it, as in some cases, PHP is "confused" about where lines of code live.

I spent some time delving into this, and initially I could not reproduce this. On my side (Linux, PHP 8.1/8.2) with php -S the behaviour was always correct, with the breakpoints resolved for each request through the dev server.

When I had another good look at the phpinfo() output from the user, I noticed:

Zend Engine v4.2.8, Copyright (c) Zend Technologies
        with Xdebug v3.2.2, Copyright (c) 2002-2023, by Derick Rethans
        with Zend OPcache v8.2.8, Copyright (c), by Zend Technologies

The above shows that Xdebug is loaded first and OPcache second, which the documentation says you shouldn't do:

Zend Opcache

Can be loaded together with Xdebug, but it is not 100% compatible.

Load Xdebug after Opcache in php.ini for better compatibility. When running php -v or when looking at phpinfo() output, Xdebug should be listed below Opcache.

After I switched the loading order of the two Zend extensions, loaded on the command line after ignoring (through -n) the normal php.ini file from:

XDEBUG_MODE=debug XDEBUG_TRIGGER=yes \
        php -n -d zend_extension=opcache -d zend_extension=xdebug \
        -S localhost:9112 -t /tmp

To:

XDEBUG_MODE=debug XDEBUG_TRIGGER=yes \
        php -n -d zend_extension=xdebug -d zend_extension=opcache \
        -S localhost:9112 -t /tmp

I could reproduce this issue.

The explanation for this is that both Xdebug and OPcache override PHP's compile file handler.

Xdebug uses this to analyse newly loaded files for lines of code that can have breakpoints to resolve them. Before doing its magic, it calls the already present handler, nominally, the built-in PHP one that converts a PHP script into byte code that the PHP engine can run.

OPcache uses the handler to see whether it sees a file being converted (parsed) for a second time. If it is in its cache, it doesn't call PHP's original compile handler again but instead returns the byte code from its cache.

If OPcache is loaded first and then Xdebug, the following sequence occurs:

  • OPcache replaces the compile file handler with opcache_compile_file, and remembers the previous one, php_compile_file.

  • Xdebug replaces the compile file handler with xdebug_compile_file, and remembers the previous one, now opcache_compile_file.

In this situation, when PHP runs the compile file handler, it first calls xdebug_compile_file, which then calls opcache_compile_file and all is well.

The process reverses if OPcache is loaded last:

  • Xdebug replaces the compile file handler with xdebug_compile_file, and remembers the previous one, php_compile_file.

  • OPcache replaces the compile file handler with opcache_compile_file, and remembers the previous one, now xdebug_compile_file.

When PHP runs the compile file handler, it calls opcache_compile first. OPcache checks whether it has seen the file already and, if not, calls the previous handler (xdebug_compile_file), but if it has seen the file already (the second request through a php -S server), it does not call the previous compile file handler.

Typically, that is what you want, as compiling files is expensive. However, because it does not call th

Truncated by Planet PHP, read more at the original (another 2152 bytes)

Link
PHP: Hypertext PreprocessorPHP 8.3.0 Beta 2 available for testing (3.8.2023, 00:00 UTC)
The PHP team is pleased to announce the second beta release of PHP 8.3.0, Beta 2. This continues the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0 Beta 2 please visit the download page.Please carefully test this version and report any issues found in the bug reporting system.Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be Beta 3, planned for Aug 17 2023.The signatures for the release can be found in the manifest or on the QA site.Thank you for helping us make PHP better.
Link
PHP: Hypertext PreprocessorPHP 8.3.0 Beta 1 available for testing (20.7.2023, 00:00 UTC)
The PHP team is pleased to announce the first beta release of PHP 8.3.0, Beta 1. This continues the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki. For source downloads of PHP 8.3.0 Beta 1 please visit the download page.Please carefully test this version and report any issues found in the bug reporting system.Please DO NOT use this version in production, it is an early test version. For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. The next release will be Beta 2, planned for Aug 3 2023.The signatures for the release can be found in the manifest or on the QA site.Thank you for helping us make PHP better.
Link
PHP: Hypertext PreprocessorPHP 8.3.0 Alpha 3 available for testing (6.7.2023, 00:00 UTC)
The PHP team is pleased to announce the third testing release of PHP 8.3.0, Alpha 3. This continues the PHP 8.3 release cycle, the rough outline of which is specified in the PHP Wiki.For source downloads of PHP 8.3.0 Alpha 3 please visit the download page.Please carefully test this version and report any issues found in the bug reporting system.Please DO NOT use this version in production, it is an early test version.For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive.The next release will be Beta 1, planned for 20 Jul 2023.The signatures for the release can be found in the manifest or on the QA site.Thank you for helping us make PHP better.
Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP