PHP has been one of the top (if not best) server-side scripting languages in the world for decades. However, let’s be honest – error logging in PHP is not the most straightforward or intuitive. It involves tweaking a few configuration options plus some playing around to get used to.
PHP is a great language to start with when you are learning how to code. It has a simple syntax, it’s easy to learn and you can make dynamic websites with it. But even though it’s easy to write PHP code, it’s not always easy to debug. There are a lot of tools out there that can help you, but since PHP is an interpreted language, you can also use a couple of debugging techniques to help you find bugs in your code. In this blog post I'll cover the the following sections.
We are proud to announce the 1.0 release of the Elastic APM PHP Agent! If you are interested in this work, please try the agent and let us know how it works for you and what features you miss! The best way to give feedback and ask questions is in our discussion forum, or if you find an issue or you would like to submit a pull request, jump to our GitHub repository. The agent is Apache-licensed, and we are more than happy to receive contributions from the community!
For our API, we’ve been happily using NewRelic’s monolog enricher for a while, which sends our application logs to NewRelic at the end of each request, making it light and fast for our system not to be bothered by it. Until it stopped working with the upgrade to Composer 2, and they knew about it for several months and still didn’t do a single thing to fix it. So I decided to move to Logflare. Logflare is a fast, light, scalable, and powerful logging aggregator.
One of the most common problems developers face regarding memory is finding memory leaks. How do you know if your application’s memory is leaking? How do you find memory leaks? In this article, you will learn.
To make sure that our service is working correctly, we have a suite of automated tests. The test suite is executed when we make changes and deploy something to production. Using the new parallel testing feature that recently landed in Laravel, we managed to run our testsuite about four times faster. Here is the test output when running all tests sequentially. The time needed is 4m28s. And here's the test output when using parallel testing. It only took 1m05s.
Lumen is a stripped down version of the powerful and now very popular Laravel PHP framework, focused on performance and serving stateless requests. I doesn’t have all the bells and whistles of Laravel, but it also doesn’t need them when serving API requests. For example, sessions, cookies and views are not a part of Lumen. It’s not intended for serving websites so everything around that got ditched.
It is important that web applications are optimized to ensure the best application performance for the end user. PHP developers can improve website performance by load testing their PHP website. Load testing checks the rigidity, speed, interoperability of the system, and the performance and the reliability of a PHP website.