Systems | Development | Analytics | API | Testing

PHP

Dealing with MySQL Lock Timeouts: Bail faster

When using MySQL and InnoDB you will inevitably run into lock timeouts sometime, somewhere. We have recently started seeing this with some of our Shopware 6 customers in their storefronts or worker queues, so I was reminded to go back to 2017 in our codebase when we put a fix in place. In our case, this happened on tables that were constantly written to from many different sources in the code base.

Tideways 2024.2 Release

Get the cake, Tideways is turning ten! Exactly on this day ten years ago, we lifted the veil on Tideways’ predecessor and thus began our exciting journey that continues to this day. We would like to celebrate by presenting interesting new features to you. Summary: Don’t miss out on our webinar that will guide you through these new features, taking place July 3rd starting at 3 pm.

A guide to PHP attributes

When building web applications in PHP, there may be times when you want to add metadata to annotate your code that can be read by other parts of your application. For example, if you've ever used PHPUnit to write tests for your PHP code, you'll have likely used the @test annotation to mark a method as a test in a DocBlock. Traditionally, annotations like this have been added to code using DocBlocks. However, as of PHP 8.0, you can use attributes instead to annotate your code in a more structured way.

New in PHP 8.4: engine optimization of sprintf() to string interpolation

PHPs compiler and bytecode cache OPcache not only cache the compile step from PHP source code to virtual machine bytecode, they also include optimizations that can produce faster bytecode: For example PHP can: For PHP 8.4 Tideways sponsored the work of our colleague Tim to add another compiler optimization for the function sprintf().

Clean code with PHP namespaces

A widespread issue developers run into when building applications is grouping and organizing code correctly so that it is easier for other developers to understand and collaborate. Conflicting class names, functions, and other code blocks is an issue for developers, and PHP offers a way to tackle this problem by adding namespaces to the language in PHP 5.3. In this article, you will learn everything you need to know to start using namespaces to organize your code efficiently in PHP.

Measuring the DOM Namespace Reconciliation Performance Fix

This is the story of the manufacturing of seven-league boots for a function that is responsible for processing XML/HTML data in the PHP library. Optimizations in the PHP standard library, like here in ext/dom, have the potential to speed up the performance of applications significantly by an upgrade to the current PHP version.

A comprehensive guide to PHP file operations

Everything you do when using computers is related to files and folders. The browser you're using to view this webpage is a file on your device, and this webpage is a file on this website's server, which means everything is a file one way or another. In this article, you will learn everything you need to know to build files and folder-related features in your PHP applications.

Tideways 2024.1 Release

You can now unpack the Christmas present that was promised to you at the end of 2023! As you may have already read in the Flamegraph Feature Preview, this exciting new feature of the Profiler is now the focus of our first release in 2024. The Flamegraph complements the Timeline and Callgraph features and visualizes Aggregated Traces. The goal was to provide profiling information across many traces and thereby gaining new and deeper insights into performance.

What is Swoole? Is it similar to Node.js?

In the realm of web development, PHP has long been a stalwart language, powering a significant portion of the internet's infrastructure. However, as the demands placed on web applications have evolved, traditional PHP setups have sometimes struggled to keep pace with performance requirements. This is where Swoole comes into play.