PHP is, in many communities, scorned and even trivialized for many reasons—a lack of asynchrony being one of the biggest detractions. Fallacies as egregious as the aforestated derision are intolerable because of the language’s current robustness. Asynchrony—using interleaved processes in a single thread—is available to users of the PHP language to address the inefficiencies of inherently slow input/output operations. We can implement it either via language modules like Swoole or idiomatic PHP solutions like ReactPHP and Amp.
This tutorial walks you through a basic CRUD API using the Slim framework. The intent is to familiarize yourself with RESTful concepts as well as the benefits of using a micro-framework versus a full-fledged one.
Do you still think browsers are only capable of parsing HTML, CSS, and JavaScript? Think again! Browsers have become much more powerful and contain numerous APIs that can enrich the user experience or are just plain fun. In this article, I’ll show you how to geolocate your users, check their battery status, measure device memory, and check their network connection.
Each installment of PHP Puzzles presents a small coding exercise typical of those we might encounter in a job interview, or on a coding challenge website. In the following month, we’ll look at a couple of possible solutions for today’s puzzle. In our last issue, we solved the very common Factorial math problem to get ourselves warmed up. We looked at an iterative and a recursive solution. I then ask readers to solve the similar Fibonacci problem.
When facing a challenging problem, you want a flexible codebase that adapts quickly. Object-oriented programming facilitates it by giving you the power through inheritance, encapsulating code in reusable objects, and generally making them work for your application as you see fit. However, we can find flexibility in other programming approaches.
Fourteen years after its first public release and six years after transitioning ownership from EllisLab to British Columbia Institute of Technology CodeIgniter (CI) has released major version 4. It continues to deliver a framework with a small footprint without having to learn a lot of framework vendor-specific functionality. CodeIgniter has always prided itself on clear, thorough documentation and favoring simple solutions over complexity.
PHP projects generally focus on rapid development. The PHP ecosystem allows us to develop new ideas in mere hours or even minutes. However, over the years, many PHP projects reach the point where changes take radically longer. There’s a high risk of breaking something else—which is the worst possible outcome when the company depends on that online presence. Here we start at the beginning with the Manifesto for Agile Software Development.
Cross-site request forgery (CSRF) is a security risk where an attacker tricks a visitor into making a malicious request to your site from another, entirely unrelated site in their control. This particular vulnerability seemingly disappeared from most teams’ radars a few years ago but is beginning to reappear in the wild.
This month, we take a moment to speak with—well technically email with—a member of the PHP community. We are very fortunate to have a community filled with people who care about making PHP stronger. Today we speak with Derick Rethans (@derickr), author, conference speaker, PHP 7.4 Release Manager, host of the PHP Internal News Podcast, and the creator/maintainer of Xdebug.
I’d like to take this month to turn the microphone around a bit and ask a question of you, the reader. With COVID-19 continuing to shut down most of the world, predictions are looking at potentially 3–12 months of it still affecting us. It may completely change permanently how we, as a society, interact.
Leave a comment
Use the form below to leave a comment: