Best of PHP — July 2025
- 1
- 2
stitcher.io·41w
The pipe operator in PHP 8.5
PHP 8.5 introduces the pipe operator (|>) that allows chaining function calls in a more readable way. Instead of deeply nested function calls or temporary variables, developers can pipe values through a series of transformations. The operator works with first-class callables for single-argument functions or closures for multi-argument functions. While currently requiring closures for complex operations, future partial function application support could make it even more concise.
- 3
Hacker News·41w
The Story of Max, a Real Programmer
A developer reflects on rewriting a 15-year-old PHP image hosting application in Go, only to discover that the original simple PHP code was superior despite being written by a teenager. The original 185-line PHP script proved more maintainable and elegant than the 305-line Go replacement, highlighting how simplicity often trumps sophisticated engineering. The story explores the value of straightforward, single-file solutions over complex, structured codebases, ultimately deciding to keep the original PHP version running.
- 4
selfhosted·38w
PersonalAccounter , Simple Self-Hoster Personal/Small-Corporate Accounting Software
PersonalAccounter is a PHP-based self-hosted accounting management system designed for personal and small corporate use. It offers expense tracking, subscription management, and reporting capabilities with easy deployment and user-friendly interface.
- 5
Laravel News·40w
The Pipe Operator is Coming to PHP 8.5
PHP 8.5 introduces the pipe operator (|>) scheduled for release on November 20, 2025. This operator enables chaining multiple callable functions from left to right, passing values through them sequentially. It improves code readability by eliminating nested function calls and temporary variables, allowing developers to write more linear and comprehensible data transformation pipelines using first-class callables.
- 6
Laravel News·40w
PHP 8.5 Introduces an INI Diff Option
PHP 8.5 introduces a new `--ini=diff` flag that displays INI configuration values that differ from built-in defaults, making it easier to identify custom settings. The feature helps developers quickly spot configuration changes without manually comparing values in php.ini files. The article demonstrates how to test this feature using PHP 8.5 alpha builds with Docker containers, showing practical examples of identifying non-default settings in both minimal and production configurations.
- 7
The Hacker News·39w
Over 600 Laravel Apps Exposed to Remote Code Execution Due to Leaked APP_KEYs on GitHub
Security researchers discovered over 260,000 leaked Laravel APP_KEYs on GitHub, with 600+ applications vulnerable to remote code execution attacks. The vulnerability stems from Laravel's decrypt() function automatically deserializing data, allowing attackers with exposed APP_KEYs to execute arbitrary code. The issue affects both older Laravel versions (CVE-2018-15133) and newer versions with specific session configurations (CVE-2024-55556). Researchers found 63% of exposures come from .env files containing additional sensitive data, and 28,000 APP_KEY/APP_URL pairs were exposed together, making attacks trivial. Proper mitigation requires immediate key rotation, system updates, and continuous secret monitoring rather than simply deleting exposed keys.
- 8
Awesome·39w
PHP is getting a huge quality-of-life upgrade | Syntax Error
PHP 8.5 introduces the pipe operator, a functional programming feature that allows chaining data transformations in a readable top-to-bottom flow. The operator passes values from left to right as function arguments, eliminating nested function calls and improving code readability. Future partial function application support will further enhance the pipe operator's flexibility by allowing placeholder syntax for multi-argument functions.
- 9
Laravel News·37w
NativePHP Is Entering Its Next Phase
NativePHP announces Bifrost, a dedicated build service that enables PHP developers to create native applications for iOS, Android, macOS, Windows, and Linux using Laravel. The service launches in late August with pricing at $12/month for individuals and $39/month for teams, offering features like cross-platform builds, app bundling, and the ability to build iOS apps without a Mac. Early adopters can secure lifetime founder pricing at $9 and $29 respectively, and existing NativePHP customers receive bonus build credits.
- 10
Platformatic·39w
Laravel and Node.js: PHP in Watt Runtime
Platformatic PHP stackable now enables Laravel applications to run within Node.js using Watt runtime. This integration uses a Rust-based native module to embed a multi-threaded PHP runtime directly inside Node.js, allowing developers to deploy PHP and JavaScript services together while reducing infrastructure complexity. The setup involves configuring workspaces, installing dependencies, and creating a platformatic.json file that handles URL rewriting for Laravel's routing system.
- 11
Neon·37w
Generate Laravel Apps from a Prompt
app.build, an open-source AI agent, now supports generating complete Laravel applications from natural language prompts. The tool handles project scaffolding, test writing, database setup with Postgres, and deployment instructions. Users can install the CLI, describe their app in a prompt, and receive a fully structured Laravel project following best practices, complete with a private GitHub repository and deployment guidance for Laravel Cloud.
- 12
- 13
FREEK.DEV·41w
Exploring Coroutines in PHP
Coroutines are explored as a programming concept for implementing asynchronous and non-blocking code. PHP supports coroutines through two main mechanisms: Generators and Fibers, each offering different approaches to handling concurrent operations and improving application performance.
- 14
Laravel News·40w
PHP Fatal Error Backtraces in PHP 8.5
PHP 8.5 introduces a new fatal_error_backtraces setting that displays stack traces for fatal errors like parse errors, duplicate class declarations, and infinite loops. This feature is enabled by default and provides detailed debugging information showing the execution path that led to the fatal error, making it easier to identify and fix issues in production applications.
- 15
Collections·37wThe Laravel Idea Plugin is Now Free for PhpStorm Users
JetBrains announced that the Laravel Idea plugin, previously a paid extension with over 1.5 million downloads, will become free for PhpStorm and IntelliJ Ultimate users starting July 30, 2025. The plugin offers advanced code generation, routing completion, Eloquent ORM support, Blade components, and integration with Livewire and Inertia.js. Users who purchased licenses after May 1, 2025, are eligible for a 50% discount on their next PhpStorm subscription renewal or can request refunds.
- 16
Laravel Daily·38w
NativePHP: Build Mobile App with Laravel (Example of Event App)
NativePHP enables developers to build mobile applications using Laravel and PHP instead of learning Flutter or React Native. The tutorial demonstrates creating an event attendance app with a Laravel backend API and NativePHP frontend. The approach involves building a responsive web application that gets packaged as a native mobile app, with authentication and data management handled through API calls. NativePHP offers features like camera access, push notifications, and secure storage, though it's a paid tool that requires network connectivity for most functionality.
- 17
Exakat·41w
Infinite loops in PHP
Explores various methods to create infinite loops in PHP including while(true), do-while, for(;;), foreach with generators, goto statements, and recursive functions. Demonstrates practical code examples for each approach while highlighting their differences in readability, efficiency, and memory usage. Emphasizes the importance of understanding these patterns to avoid accidental infinite loops in production code.
- 18
Kamruzzaman Kamrul·40w
A Security Checklist for Your Laravel App Before You Hit Deploy
A comprehensive security checklist for Laravel applications before production deployment, covering essential practices like disabling debug mode, setting proper file permissions, input validation, securing debug tools, protecting environment variables, hardening file uploads, enforcing HTTPS with security headers, route protection, safe logging configuration, and queue security. Includes practical code examples and recommendations for monitoring tools to detect potential security threats.
- 19
- 20
Laravel News·41w
Laravel in the First Half of 2025
Laravel 12 was released in February 2025 with new starter kits and custom starter kit support. Laravel Cloud launched as a fully managed infrastructure platform for deploying Laravel applications. Native PHP Mobile v1 enables building iOS and Android apps using Laravel. Laravel Nightwatch provides deep monitoring for Laravel applications. Tailwind CSS v4 was released with improved performance and CSS-first configuration. Upcoming events include Laracon US, Laravel Live Denmark, and Laracon AU, with PHP 8.5 scheduled for November featuring the pipe operator and new array functions.
- 21
ACF·38w
WordPress Block Theme Development Step by Step
Block themes represent a modern approach to WordPress development, offering full visual control through the block editor without requiring code changes. The development process involves setting up a local environment, creating core files like theme.json and HTML templates, and using the Site Editor for customization. Advanced Custom Fields (ACF) simplifies custom block creation by allowing developers to use familiar PHP instead of complex JavaScript or React, making the development process more efficient and accessible.
- 22
Laravel News·38w
Singleton and Scoped Container Attributes in Laravel 12.21
Laravel 12.21.0 introduces singleton and scoped container attributes that can be applied directly to classes without manual registration. The release adds a whereValueBetween() query builder method for checking if values fall between two columns, strict validation options for numeric and boolean types, factory relationship controls, URI stringable conversion, and fluent empty check methods.
- 23
- 24
Laravel News·40w
Run Laravel Pint Faster in Parallel Mode
Laravel Pint now supports a --parallel flag that makes code formatting up to 40x faster by leveraging PHP CS Fixer's parallel capabilities. The feature is experimental and available in version 1.23.0 or later. This release also introduces configuration file extension, allowing projects to inherit settings from base configuration files while customizing specific rules.
- 25
Laravel News·41w
Native array_first() and array_last() Functions in PHP 8.5
PHP 8.5 introduces native array_first() and array_last() functions to retrieve the first and last elements from arrays. These functions address long-standing challenges with existing solutions like reset() and end() that modify array iterators or require cumbersome workarounds. The functions return null for empty arrays and work with any array structure regardless of key types. Popular frameworks like Laravel and Symfony already provide similar functionality through helper methods and polyfills.