Articles
New pieces on PHP today, then everything from the archive.
New
- #[Tooling]
PHPStan on Legacy Code: Baselines, Levels, and Green CI
Add PHPStan to a legacy PHP codebase without halting feature delivery. Choose a starting rule level, generate a baseline, configure CI, and get to green. - #[Language]
PHP 8.5 Features: What Changed and How to Upgrade
Explore new PHP 8.5 features with runnable examples, from the pipe operator and clone with syntax to deprecations, breaking changes, and upgrade testing tips. - #[Tooling]
PHP Profiling: Xdebug, SPX, XHProf, and Blackfire Compared
Find out why PHP requests run slowly in modern PHP. Compare Xdebug, SPX, XHProf forks, and Blackfire with install configs, overhead, and production trade-offs.
Archive
96 articles from the PHP Advent calendars.
- #[Archive]
Because It’s Fun!
Twelve years ago, computers were a mystery to me, but a friend of mine showed me how I could just go down to the computer parts store, pick out a... - #[Archive]
More Than Just Style
PHP CodeSniffer is a wonderfully simple tool for implementing and enforcing a coding standard. The basic installation comes with a handful of... - #[Archive]
Reduced-Friction Deployment
I view my job as shepherding code from its inception in a Vim buffer, in a terminal session, in my development environment, until it makes it up into... - #[Archive]
Better Than the Rest
If you’ve written a web service that other clients are going to connect to, I’m willing to bet you think you’ve done a pretty good job. I would like... - #[Archive]
A Stitch in Time Saves Nine
It is easiest to describe the N+1 problem by example. Take a look at the following bit of PHP in a hypothetical blog app: We have a master set of... - #[Archive]
Dates and Times
Having dealt with a lot of dates and times — and the calculations between them — recently, I thought it might be a good idea to write down some of... - #[Archive]
Twilio in Two Minutes
I love Twilio . If you’re not familiar with Twilio and the amazing voice and text messaging stuff you can do with it, you’re in luck! I’m going to... - #[Archive]
Integration Testing
At some point in our respective programming careers, most of us have heard that Test-Driven Development (TDD) is what we should be doing. The TDD... - #[Archive]
Merry Error Handling
PHP does not enjoy the same consistency in error (and exception) handling as other languages, mostly due to historical reasons and the lack of a... - #[Archive]
Better Object-Oriented Arrays
I’ve been working on developer-facing software and SDKs in PHP for nearly a decade, and through the experience of supporting these developers, I’ve... - #[Archive]
Out with the Old
Jetpacks. Flying cars. Databases able to handle infinite amounts of data. Breakthrough after breakthrough, computer engineering forges a shiny... - #[Archive]
Bake Cookies Like a Chef
It’s Christmas time again. While you write the first lines of your shiny new authentication library, the smell of tasty cookies is slowly sneaking... - #[Archive]
Don’t Forget the Front
Everyone talks about automated testing for your code, but that’s only half of the testing I need. What about the front end? Forms need some testing... - #[Archive]
Nightmare Before (Last) Christmas
A little over a year ago I was plunged into a nightmare world. I had accepted a new job as the lone PHP developer at a relatively small business, and... - #[Browser]
Cross-Origin Ajax with CORS
Cross-origin requests without JSONP or proxies: the CORS headers a PHP backend has to send. - #[Archive]
Cracks in the Foundation
PHP has been around for a long time, and it’s starting to show its age. From top to bottom, the language has creaky joints. I’ve decided to take a... - #[Archive]
PHP for All the Things
PHP was originally designed for web sites and is still widely thought of only as a programming language for the Web. But with the approaches below... - #[Archive]
Simplifying Commerce for Small Business
Selling has never been easy. There’s too much red tape. The simple act of you giving me currency in exchange for a good or service I provide is not... - #[Archive]
Egomaniacal and Scalable Apps
The rise of cloud computing over the past few years has been incredible. Unfortunately, many still do not see the interest or do not comprehend its... - #[Archive]
Code for the Users, Not for the Spec
I don’t know exactly when it was that I started to resent the people I was writing code for, but it was a sure sign that I was feeling burned out.... - #[Archive]
Social-Driven Development
As any developer can tell you, the way we write apps has changed dramatically over the past year. It’s been amazing to see how the quality of code... - #[Archive]
Keep the Front in the Front
I’m both a front- and back-end developer, and, at edgeofmyseat.com , we mainly work on projects where we get to control the full stack — from server... - #[Archive]
Look Ma! No Passwords!
Your user sign-in experience is one of the most important interactions on your site, and all of the options you have fall short of what you need. You... - #[Archive]
Facilitating Development Environment Consistency
Every developer is different, but your team’s development environment does not have to be. A modern web app uses many different technologies. Common... - #[Archive]
Localization
When creating a web site, it is important to consider the audience. Regardless of whether the web site is selling goods, providing a service, or... - #[Archive]
First-Class APIs
APIs are commonly an afterthought, like a hot tub awkwardly attached to a house — a shoehorned approach that produces a suboptimal app with scarce... - #[Performance]
Profiling with XHGui
Profiling PHP in production with XHProf and XHGui: finding the slowest and hungriest calls, and what opcode caches change. - #[Archive]
The Thing with the Two Heads
(With apologies to Rosie Grier .) As web developers, we usually think of the apps or sites we create as single, contained units. That’s... - #[Archive]
Code for Today
Most programmers are lazy, for some value of lazy. Many of us claim that we are efficient, doing no more than is actually needed, pulling resources... - #[Archive]
JavaScript for PHP Developers
Hopefully, you’ve been a good geek in 2010. You’ve followed last year’s advice and learned some JavaScript. Now, let’s kick back with a glass of wine... - #[Archive]
Bits and PHPieces
I like to think of PHP as a mixed bag of tricks. The language itself was born out of some simple, real-world use cases , and that ideology still... - #[Archive]
Output Buffering
When I chose to write about output buffering for this year’s PHP Advent, my depth of knowledge on the subject was very limited. I picked a topic that... - #[Archive]
Building Mobile Apps with PHP
Way back when I first dove into web programming, PHP was the obvious choice for my needs. It was available on virtually all web servers, had... - #[Archive]
Everyone Loves PHP
A year ago today, I started at Facebook. I’ve been using PHP for the last twelve years, and before I got there, I thought I had seen most PHP-related... - #[Archive]
Managing LAMP
One of the things that initially attracted me to PHP was that I could write all of my apps in pure PHP, and they would run anywhere I deployed them.... - #[Archive]
Share and Enjoy
“ Share and Enjoy ” is the motto of a certain division of the largely successful Sirius Cybernetics Corporation . I’m here to complain about it.... - #[Archive]
Streams
If you want to start building your own apps, one of the most important things you need to know is how to access APIs. How else are you going to get... - #[Archive]
Usage Statistics
A few years ago, Damien Seguy started collecting information about what version of PHP people were using and how PHP’s usage compared to competing... - #[Archive]
Debugging
“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is... - #[Archive]
Legacy Jungle
At some point in every developer’s career, they get the opportunity to work on a gnarly, horrible briar patch of a project. Surviving that experience... - #[Archive]
Thumbnails
Many of us have had the pleasure of building a web application that requires the automated building of thumbnails from images that are uploaded at... - #[Archive]
Text and Media Files
With a team of developers, I recently built a mission-critical web app that relied heavily upon the manipulation of files. I’d like to give you a... - #[Archive]
The Ghost of Christmas Past
PHP has been around nearly as long as there has been a Web to develop for, but it evolves constantly and is a modern programming language by almost... - #[Archive]
Big Data
Big data, data science, analytics. These are some of the hottest buzzwords in tech right now. Five years ago, the boasting rights went to the geek... - #[Archive]
Color for the Holidays
If part of your job involves debugging or monitoring PHP apps, you’ll most likely have used tail to check for errors in a log file. While practical,... - #[Archive]
Don’t Panic
It’s finally happening. The end is near. The server is about to be destroyed by a fleet of Vogon cruisers. Actually, the server is about to be... - #[Archive]
Aspect-Oriented Design
I try to write simple apps. I try to code for today , as Lorna articulated so well. Almost invariably, I end up with something more complex than I... - #[Archive]
Mistrust and Verify
When working on a web app with coworkers or fellow volunteers, few things are more important within the group than trust. Trust among developers... - #[Archive]
Comprehensible Code
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” — Refactoring: Improving the Design... - #[Archive]
You Really Need to Learn JavaScript
PHP developers have typically worn a few hats. Few of us are “pure” PHP developers, where we only write PHP and don’t scribble together some HTML at... - #[Archive]
Do URLs Matter?
I liked how Chris and Sean describe their role as curating PHP Advent, so I thought I’d do a little sub-curation of my own. This entry is a... - #[Archive]
One Step at a Time
I have the privilege, in my current line of work, to be able to attend quite a number of conferences and other technical events throughout the year.... - #[Archive]
Automate Your Deployment
Deploying your web site to a server can be an exercise in frustration and fraught with mistakes. There’s a lot to remember during deployment, from... - #[Archive]
Parenting Versus Programming
Advent calendars are about Christmas, and for me Christmas has always been a time for family. This year I have recently joined the ranks of the... - #[Archive]
Get a Haircut
Getting a job can be a harrowing experience. Many companies run candidates through a gauntlet of tests and interviews in the hopes of separating the... - #[Testing]
Testing with PHPT and xUnit
Keeping a test suite fast enough that people keep running it, by combining PHPT files with an xUnit runner. - #[Archive]
Developers Versus Designers
Developers versus designers is a struggle that has gone on for as long as there have been computers. The bickering has been around for ages, stifling... - #[Encoding]
Character Sets: Garbage In, Garbage Out
Why accented characters turn into replacement glyphs, and how to get one character set right from form to database to template. - #[Archive]
World of PHPCraft
Dear Santa, I’ve been a bad girl this year. I haven’t fixed bugs in my extensions. I’ve barely worked on PHP 6. I only attended a handful of... - #[Archive]
JSON Gotchas
JSON is a subset of the JavaScript language. JavaScript itself is based on ECMAScript, which is standardized in the ECMA-262 standard . Just this... - #[Archive]
Untitled
No one reads anymore, and you’re not going to read this. You’re going to scan it. We need to more seriously consider how application design evolves... - #[Archive]
CSS and Other People
The road between design and development is fraught with all sorts of peril — as Helgi has already pointed out . Bringing a visual concept to the Web... - #[Archive]
Dæmonize Your PHP
Despite the haters, I actually really like PHP. Well-written PHP strikes a solid balance between getting things done and getting things done properly... - #[Archive]
Managing Bob
The interaction between technical people and the project sponsor has common patterns regardless of your employment model. Project sponsors — whether... - #[Archive]
PHP’s Not Just a Language
“I did not develop the PHP we know today. Dozens — if not hundreds — of people developed PHP. I was simply the first developer.” — Rasmus Lerdorf 1... - #[Archive]
You Don’t Need All That
I’ve been writing PHP for a long time. I am not one of its dinosaurs, but I’ve been making it do my bidding since PHP 3. I have also seen a lot of... - #[Archive]
Performance for Web Apps
When it comes to programming, there are two things that I enjoy doing the most: making things faster and improving security. The two sometimes come... - #[Archive]
Unmaintainable PHP
With the recent unemployment rates, everybody realizes that job security is important. The best way to keep a job is to be irreplaceable. If no one... - #[Archive]
GeoIP Wrangling
When making the Analog holding page, we wanted to add a touch of personality to make the experience warmer and more welcoming. One of our ideas was... - #[Archive]
PHP in Odd Places
PHP has traditionally been used to solve web problems, and for this, it excels. Over the past year and a half, I have been doing some unusual things... - #[Archive]
Exceptional PHP
Call me crazy, but I love exceptions. I love exceptions to the rules. I love exceptions to language syntax, both programming and natural. I... - #[Archive]
1,500 Lines of Code
Even the best of us can only write 1,500 lines of code a day, so we need to make those lines count. There were so many great articles in PHP Advent... - #[Archive]
You Need the PHP Community
Let me paint a picture for you—there’s a young developer, sitting in his parents’ basement, hacking away at his latest masterpiece. He has built it... - #[Archive]
Use Responsibly
Hopefully you’re following Chris Cornutt’s advice , and you’re engaging the PHP community through a variety of media—forums, IRC, mailing lists, user... - #[Archive]
Don’t Commit That Error
It’s easy to get caught up in testing patterns, frameworks, and other “correct” ways to to handle testing, but we often overlook some of the simple... - #[Archive]
Why Using PHP Makes You Cooler
A few years ago, I had the pleasure of writing a regular column for the now defunct International PHP Magazine where I highlighted sites that were... - #[Archive]
Which Web Service?
We have seen a dramatic rise of the SOA (Service-Oriented Architecture) in our shiny new Web 2.0 world. Every site has an API of some kind and no... - #[Archive]
Questions to Ask Before Changing Jobs
Over the past six months, I’ve had the same conversation with several people. It usually starts something like this: “<dream company /> is interested... - #[Archive]
Commenting on Commenting
Everyone knows the standard programming mantra “Document your code” (although some people seem to still not follow it), but today I want to talk... - #[Archive]
Getting Started the Right Way
Everyone has that grand idea. A few want to finally write that open source project or that great novel. Most need to clean the garage. All of us have... - #[Archive]
Coping with the Holiday Shopping Spree
Now that the holidays are closing in, a lot of people are realizing that they have not yet bothered to buy gifts for their close ones, which is why... - #[Archive]
Guide to Conferences
There are a wide variety of conferences in the PHP world: there are small half-day conferences at one end of the spectrum and full-blown 5-day... - #[Archive]
The Framework as Franchise
Why bother using a public framework not of your own design? You have heard that frameworks are heavy and slow; just look at Rasmus’s benchmarks (and... - #[Archive]
JSON is Everybody’s Friend
Last year I wrote some kind of feel-good, hippie crap for the PHP Advent Calendar. This year I got a haircut, took a shower, and am ready to tell you... - #[Archive]
Optimize This
One of the greater challenges of writing good software is avoiding bugs. And, if that can’t be done, finding them. There is much to say about proper... - #[Archive]
“Yet”
Have you ever wondered why PHP was invented? It’s relatively easy to find out how the language grew out of one of those scratch-an-itch situations... - #[Archive]
MySQL Client Tips
PHP developers commonly have to work with many technologies other than PHP, and frequently only know enough about them to avoid tripping over... - #[Archive]
PHP Meritocracy
When Chris Shiflett asked me to write an article for PHP Advent , my first inclination was to talk about Unicode support in PHP 6, why it’s... - #[Archive]
Full-Text Searching with SQLite
I’ve evangelized SQLite a lot this year, speaking at various conferences and user groups to try encourage use and support within many web... - #[Archive]
Less Whining, More Coding
How many times have you heard or seen someone griping about PHP? Maybe the documentation was wrong, or they couldn’t figure out how to install it, or... - #[HTTP]
Practice Safe Idempotent Methods
What safe and idempotent HTTP methods mean, and why a GET that changes data will come back to bite you. - #[Archive]
PHP Is Not Java
Java has its place. Maybe it has many places. I’m OK with it being on your phone, in your refrigerator, and on my bank’s web site. I’m even OK with... - #[Archive]
Listen
I recently had the opportunity to attend Adobe MAX . Meanwhile, my associate Elizabeth Naramore attended the Microsoft Web Developer Summit. We both... - #[Dates]
What Time Is It?
Why timestamps and zone abbreviations mislead, and how PHP's DateTime and named time zones avoid both. - #[Archive]
On Internationalization
Two weeks ago, I was in Buenos Aires for CakeFest . It was an excellent opportunity to connect with the community and discover some of the creative... - #[Archive]
PHP Without PHP
Take a simple PHP trick and follow it on a huge tangent to the philosophy of good web architecture. It's an honor to be asked to share my ideas with...