Introducing ZendHQ database query introspection, making it easier than ever to find and fix performance and functionality issues with databases in your PHP application.
Author: admin
Upgrading PHP 8.0: Upgrade Paths and Considerations
Need to upgrade off PHP 8.0? Get an overview of upgrade paths and considerations, including considerations for upgrading from PHP 8.0 to 8.1, 8.2, and 8.3.
A Beginner PHP Tutorial in 6 Steps
In this blog, our expert walks through a PHP tutorial for beginners, including everything from setting up your dev environment, to connecting to a database.
PHP 8.3.0 RC 2 available for testing – PHP: Hypertext Preprocessor
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.
Xdebug Update: August 2023 – Derick Rethans
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.
Truncated by Planet PHP, read more at the original (another 1631 bytes)
How to Learn PHP in 2023
See how to learn PHP in 2023, including details on when you should consider training courses, bootcamps, books, and other PHP training options.
PHP 8.3.0 RC 1 available for testing – PHP: Hypertext Preprocessor
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.
IBM i 7.5 for PHP: Exploring Db2 Services
Get an overview of IBM i 7.5 for PHP — including details on the new and improved Db2 services — as well as other features, benefits, and considerations for teams deploying PHP on IBM i.
How to Improve PHP Performance: Best Practices for PHP Apps
Struggling with PHP performance? See best practices for PHP performance tuning for new and existing PHP applications in this blog from our PHP expert.
PHP 8.3.0 Beta 3 available for testing – PHP: Hypertext Preprocessor
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.