Posts marked with “php”

Bug-free Money Handling with MoneyPHP

by · November 11, 2020

0
 

Do we really know how to handle one of the fundamental business operations—calculating monetary amounts? Floating-point calculations, often used with financial transactions, are notoriously tricky and error-prone because of how computers process them. In this article, we’ll look at how you can avoid making them in your application.

 

Applying Best Coding Practices to PHP, Part One

by ·

0
 

When advancing in our careers as developers, we come across some questions about the structure of our software. Before long, the main question about solving a problem is not about what to do anymore, but how to do it elegantly. We start looking for better development tactics and how to make our code mode readable […]

 

Improving Your PHP with Static Types

by ·

0
 

As PHP incorporates more features typical of statically typed languages, you have the option of adopting an entirely new programming style. While static typing can make your code easier to understand, refactor, and test, PHP’s implementation isn’t quite the same as other languages. This article covers the state of static typing in PHP and how […]

 

More Than Asynchronous I/O, Introduction To Swoole PHP

by · October 23, 2020

0
 

By Bruce Dou Swoole PHP is a coroutine based asynchronous network application framework. It is a PHP extension that extends PHP core and utilizes more power provided by Linux OS. Unlike the callback style single thread asynchronous I/O provided by the other networking libraries like Node.js, Swoole PHP has multiple asynchronous I/O threads and native […]

 

Sustainable PHP: Refactor to Competitive Advantage

by · October 5, 2020

0
 

Technical debt is always, and continuously, a challenge. Needs change. This month we’re looking at an approach for being continually prepared for change—refactoring, with unit tests in place.

 

The Workshop: PHP Development with Homestead in WSL

by ·

0
 

We’ve spent the past two months talking about Windows Subsystem for Linux (WSL) in Windows 10 and how to customize it to serve as a PHP development environment. While functional, our environment lacked a fair bit of polish. In the nearly four years that I’ve been working on and maintaining Laravel Homestead, I’ve spent much […]

 

Education Station: Race Conditions and Dead Locks

by ·

0
 

Despite PHP shifting more and more toward preferring Object-Oriented Programming, at its heart, PHP is a procedural language. All of the code is executed one line at a time, in the order that the parser receives it. To my mind, one of PHP’s strengths is blending a versatile object model along with procedural programming. Web […]

 

PHP Puzzles: Improved Directions

by ·

0
 

In our last issue, we simulated population growth—a component of many popular games. In this article, we look at pruning redundant items from a list of directions.

 

PHP and Database Access

by · September 11, 2020

0
 

In its early days, the Internet was all about sharing static data like images, flat text files, and downloadable binaries. The early Internet’s static nature was useful in for sharing information. In many ways, the ability to tie static web pages to the dynamic content resident in enterprise databases allowed us to build new kinds of applications. This is where, in many respects, PHP shines.

 

Security Corner: Observable Security

by · September 1, 2020

0
 

Among the easiest ways to ensure your website or web application is behaving security is to subject it to objective, third-party security scans. The Mozilla Observatory is one such tool that helps ensure strong security for any system operating on the public Internet. The Observatory automatically scans your website to make sure you correctly configure […]