14 Jan 2020

feedPlanet PHP

What Conference Organizers Wish Speakers Knew

14 Jan 2020 4:33pm GMT

10 Jan 2020

feedPlanet PHP

4 Reasons to Use Image Processing to Optimize Website Media

4 Reasons to Use Image Processing to Optimize Website Media

This sponsored article was created by our content partner, BAW Media. Thank you for supporting the partners who make SitePoint possible.

Image optimization is a big deal when it comes to website performance. You might be wondering if you're covering all the bases by simply keeping file size in check. In fact, there's a lot to consider if you truly want to optimize your site's images.

Fortunately, there are image processing tools and content delivery networks (CDNs) available that can handle all the complexities of image optimization. Ultimately, these services can save you time and resources, while also covering more than one aspect of optimization.

In this article, we'll take a look at the impact image optimization can have on site performance. We'll also go over some standard approaches to the problem, and explore some more advanced image processing options. Let's get started!

Why Skimping on Image Optimization Can Be a Performance Killer

If you decide not to optimize your images, you're essentially tying a very heavy weight to all of your media elements. All that extra weight can drag your site down a lot. Fortunately, optimizing your images trims away the unnecessary data your images might be carrying around.

If you're not sure how your website is currently performing, you can use an online tool to get an overview.

Results of a website speed test

Once you have a better picture of what elements on your website are lagging or dragging you down, there are a number of ways you can tackle image optimization specifically, including:

As with any technical solution, you'll have to weigh the pros and cons of each approach. However, it's also worth noting that these more traditional approaches aren't the only options you have available to you.

4 Reasons to Use Image Processing for Optimizing Your Website's Media

As we

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

10 Jan 2020 5:00pm GMT

07 Jan 2020

feedPlanet PHP

Xdebug Update: December 2019

Xdebug Update: December 2019

London, UK
Tuesday, January 7th 2020, 09:52 GMT

Another month, another monthly update where I explain what happened with Xdebug development in this past month. It will be published on the first Tuesday after the 5th of each month. Patreon supporters will get it earlier, on the first of each month. You can become a patron here to support my work on Xdebug. If you are leading a team or company, then it is also possible to support Xdebug through a subscription.

In December, I worked on Xdebug for near 50 hours, on the following things:

Xdebug 2.9.0

After releasing Xdebug 2.8.1, which I mentioned in last month's update, at the start of the month, more users noticed that although I had improved code coverage speed compared to Xdebug 2.8.0, it was still annoyingly slow. Nikita Popov, one of the PHP developers, provided me with a new idea on how to approach trying to find out which classes and functions still had to be analysed. He mentioned that classes and functions are always added to the end of the class/function tables, and that they are never removed either. This resulted in a patch, where the algorithm to find out whether a class/function still needs to be analysed changed from from O(n²) to approximately O(n). You can read more about this in the article that I wrote about it. A few other issues were addressed in Xdebug 2.9.0 as well.

Breakpoint Resolving

In the May update I wrote about resolving breakpoints. This feature will try to make sure that whenever you set a breakpoint, Xdebug makes sure that it also breaks. However, there are currently two issues with this: 1. breaks happen more often than expected, and 2. the algorithm to find lines is really slow. I am addressing both these problems by using a similar trick to the one Nikita suggested for speeding up code coverage analysis. This work requires quite a bit of rewrites of the breakpoint resolving function, and hence this is ongoing. I expect this to cumulate in an Xdebug 2.9.1 release during January.

debugclient and DBGp Proxy

I have wanted to learn Go for a while, and in order to get my feet wet I started implementing Xdebug's bundled debugclient in Go, and at the same time create a library to handle the DBGp protocol.

The main reason why a rewrite is useful, is that the debugclient as bundled with Xdebug no longer seems to work with libedit any more. This makes using debugclient really annoying, as I can't simply use the up and down arrows to scroll through my command history. I primarily use the debugclient to test the DBGp protocol, without an IDE "in the way".

The reason to write a DGBp library is that there are several implementations of a DBGp proxy. It is unclear as to whether they actually implement the protocol, or just do something that "works". I will try to make the DBGp proxy that I will be working on stick to the protocol exactly, which might require changes to IDEs who implement it against an non compliant one (Komodo's pydbgpproxy seems to be one of these).

This code is currently not yet open source, mostly because I am still finding my feet with Go. I expect to release parts of this on the way to Xdebug 3.0.

Business Supporter Scheme and Funding

Support through the Business Supporter Scheme continues to trickle in.

This month's new supporter is Stratege

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

07 Jan 2020 9:52am GMT

06 Jan 2020

feedPlanet PHP

Rules for working with dynamic arrays and custom collection classes

06 Jan 2020 10:20am GMT

02 Jan 2020

feedPlanet PHP

Performance testing HTTP/1.1 vs HTTP/2 vs HTTP/2 + Server Push for REST APIs

02 Jan 2020 12:00pm GMT

31 Dec 2019

feedPlanet PHP

Ajax live search, enhance your site’s search experience

If your website has a lot of pages, a good working search function becomes more important. Is your website based on WordPress? Then you don't need to worry about the search function, because it's a standard feature. But how about a great search experience? Relevant search results are one part of the game, but how […]


31 Dec 2019 3:31pm GMT

23 Dec 2019

feedPlanet PHP

The release of Object Design Style Guide

23 Dec 2019 2:15pm GMT

19 Dec 2019

feedPlanet PHP

BigQuery: Using multiple cursors / rectangular selection in BigQuery UI

Multiple keyboard shortcuts usable in the BigQuery UI are listed in the official documentation, though the one for using multiple cursors is missing:

ALT + left-mouse-button-drag

Using multiple cursors in the BigQuery UI via ATL + left mouse drag


Use cases

We often deal with multiple datasets and tables that have the exact same structure, e.g. due to sharding. In those cases it's often required to modify different parts of the query in the exact same way so that multiple cursors come in handy.

19 Dec 2019 1:05pm GMT

18 Dec 2019

feedPlanet PHP

Routing in Slim 4

Routing in Slim 4 works pretty much exactly the same as in Slim 3. They are used to map a URL that the browser requests to a specific handler that executes the code for that particular page or API endpoint. You can also attach middleware that will only be run when that route is matched. The route in the slim4-starter looks like this: [crayon-5e1f94c5143c3299191549/] It is made up of the method, the pattern and the… continue reading.

18 Dec 2019 11:00am GMT

PHP 7.3.13 Released

The PHP development team announces the immediate availability of PHP 7.3.13. This is a security release which also contains several bug fixes.All PHP 7.3 users are encouraged to upgrade to this version.For source downloads of PHP 7.3.13 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

18 Dec 2019 12:00am GMT