Are you using FFI, and how?
Hey everyone!
Been writing PHP for years, and recently got a bit deeper into C. While poking around, I stumbled across PHP's FFI (Foreign Function Interface), something I've totally overlooked til now. Great to be learning new things about PHP everyday.
Seems like a powerful feature to offload C functions straight from PHP, I've got a few ideas, such as offloading performance-heavy stuff, playing with native libraries, etc. But I'm curious of others experience with this feature, and if it's all that.
So, yeah, if you've used it:
\- What kinds of things have you built?
\- Anything made it into production?
\- Is it a feature that is production-ready or more for experimental usecases?
\- Heaven/Horror stories using it?
Would love to hear people's stories and what kind of use cases people have found for it.
https://redd.it/1optg8a
@r_php
Hey everyone!
Been writing PHP for years, and recently got a bit deeper into C. While poking around, I stumbled across PHP's FFI (Foreign Function Interface), something I've totally overlooked til now. Great to be learning new things about PHP everyday.
Seems like a powerful feature to offload C functions straight from PHP, I've got a few ideas, such as offloading performance-heavy stuff, playing with native libraries, etc. But I'm curious of others experience with this feature, and if it's all that.
So, yeah, if you've used it:
\- What kinds of things have you built?
\- Anything made it into production?
\- Is it a feature that is production-ready or more for experimental usecases?
\- Heaven/Horror stories using it?
Would love to hear people's stories and what kind of use cases people have found for it.
https://redd.it/1optg8a
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
New in Symfony 7.4: Attribute Improvements
https://symfony.com/blog/new-in-symfony-7-4-attribute-improvements?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oputx7
@r_php
https://symfony.com/blog/new-in-symfony-7-4-attribute-improvements?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oputx7
@r_php
Symfony
New in Symfony 7.4: Attribute Improvements (Symfony Blog)
Symfony 7.4 improves routing, security, and event attributes with more features.
How to Create Custom GraphQL Queries in API Platform
https://youtu.be/yRb0tiJHn9M
https://redd.it/1opu2n9
@r_php
https://youtu.be/yRb0tiJHn9M
https://redd.it/1opu2n9
@r_php
YouTube
How to Create Custom GraphQL Queries in API Platform - PART 1 #graphql #symfony #php
In this video, I’ll show you how to use Query and QueryCollection in API Platform GraphQL to perform joins, fetch related data from multiple tables, and retrieve paginated results. You’ll also learn how to use arguments, filters, default parameters, and work…
I built a static site generator in pure php
I've been working on PHPSSG recently, it's a pure php static site generator with cool features like component based routing, lifecycle hooks, caching, incremental builds, etc. Take a look, you might get some use out of it. It's minimal in design and completely configurable. It leaves a lot of decisions up to you. Templates are written in plain php but you can easily overwrite the renderer and use something like twig or blade instead if you want. PHPSSG can be your entire codebase or just a small part of it, I built it playing to PHP's strengths. I would really appreciate any feedback you have about the project, I'm completely open to suggestions and criticism.
https://redd.it/1opy148
@r_php
I've been working on PHPSSG recently, it's a pure php static site generator with cool features like component based routing, lifecycle hooks, caching, incremental builds, etc. Take a look, you might get some use out of it. It's minimal in design and completely configurable. It leaves a lot of decisions up to you. Templates are written in plain php but you can easily overwrite the renderer and use something like twig or blade instead if you want. PHPSSG can be your entire codebase or just a small part of it, I built it playing to PHP's strengths. I would really appreciate any feedback you have about the project, I'm completely open to suggestions and criticism.
https://redd.it/1opy148
@r_php
GitHub
GitHub - Taujor/php-static-site-generator: A static site generator written in vanilla php utilizing automated dependency injection…
A static site generator written in vanilla php utilizing automated dependency injection (php-di) for ease of use. - Taujor/php-static-site-generator
Laramap – Discover fellow Laravel developer
https://laramap.dev?utm_source=reddit
https://redd.it/1oq22ch
@r_php
https://laramap.dev?utm_source=reddit
https://redd.it/1oq22ch
@r_php
laramap.dev
Laramap is a community-driven map connecting Laravel artisans worldwide.
SymfonyCon Amsterdam 2025: Rubber Duck Driven Dev: Use MCPs to Develop and Deploy Safely
https://symfony.com/blog/symfonycon-amsterdam-2025-rubber-duck-driven-dev-use-mcps-to-develop-and-deploy-safely?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oq46lu
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-rubber-duck-driven-dev-use-mcps-to-develop-and-deploy-safely?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oq46lu
@r_php
Symfony
SymfonyCon Amsterdam 2025: Rubber Duck Driven Dev: Use MCPs to Develop and Deploy Safely (Symfony Blog)
🚨 New talk! Turn prompts into real Symfony features! 🚀 At SymfonyCon Amsterdam 2025, Greg Qualls shows how to use AI as a controlled, auditable development assistant in “Rubber Duck Driven De…
New in Symfony 7.4: Request Class Improvements
https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oqqbnm
@r_php
https://symfony.com/blog/new-in-symfony-7-4-request-class-improvements?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1oqqbnm
@r_php
Symfony
New in Symfony 7.4: Request Class Improvements (Symfony Blog)
Symfony 7.4 introduces key updates to the Request class, including deprecations, expanded body parsing for more HTTP methods, and stricter control over method overrides.
Is adding declare(strict_types=1) increase code performance?
In Laravel and Symfony projects, I add `declare(strict_types=1);` at the top of my Controllers and Services.I know that it improves code reliability. But my teammate says it also increase code performance. Is this correct?
https://redd.it/1oqrboa
@r_php
In Laravel and Symfony projects, I add `declare(strict_types=1);` at the top of my Controllers and Services.I know that it improves code reliability. But my teammate says it also increase code performance. Is this correct?
https://redd.it/1oqrboa
@r_php
Reddit
From the PHP community on Reddit
Explore this post and more from the PHP community
Just published Multitron 1.0 - MIT-licensed beautiful CLI PHP Task Orchestrator library for large processes, exports, synchronizations, etc. Please give me your feedback!
https://github.com/riki137/multitron
https://redd.it/1oqt7tk
@r_php
https://github.com/riki137/multitron
https://redd.it/1oqt7tk
@r_php
GitHub
GitHub - riki137/multitron: Library for executing and maintaining series of complex tasks
Library for executing and maintaining series of complex tasks - riki137/multitron
Filament plugin to manage application cache
https://github.com/binarybuilds/filament-cache-manager
https://redd.it/1oqwx1r
@r_php
https://github.com/binarybuilds/filament-cache-manager
https://redd.it/1oqwx1r
@r_php
GitHub
GitHub - binarybuilds/filament-cache-manager: Filament Cache Manager is a FilamentPHP plugin that allows you to easily clear your…
Filament Cache Manager is a FilamentPHP plugin that allows you to easily clear your Laravel application cache directly from the Filament admin panel. - binarybuilds/filament-cache-manager
Storing LLM Context the Laravel Way: EloquentChatHistory in Neuron AI
https://inspector.dev/storing-llm-context-the-laravel-way-eloquentchathistory-in-neuron-ai/
https://redd.it/1oqxt05
@r_php
https://inspector.dev/storing-llm-context-the-laravel-way-eloquentchathistory-in-neuron-ai/
https://redd.it/1oqxt05
@r_php
Storing LLM Context the Laravel Way: EloquentChatHistory in Neuron AI
https://inspector.dev/storing-llm-context-the-laravel-way-eloquentchathistory-in-neuron-ai/
https://redd.it/1oqxtkm
@r_php
https://inspector.dev/storing-llm-context-the-laravel-way-eloquentchathistory-in-neuron-ai/
https://redd.it/1oqxtkm
@r_php
Reddit
From the PHP community on Reddit: Storing LLM Context the Laravel Way: EloquentChatHistory in Neuron AI
Explore this post and more from the PHP community
SymfonyCon Amsterdam 2025: From PR to launch: how code becomes product narrative
https://symfony.com/blog/symfonycon-amsterdam-2025-from-pr-to-launch-how-code-becomes-product-narrative?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1or189t
@r_php
https://symfony.com/blog/symfonycon-amsterdam-2025-from-pr-to-launch-how-code-becomes-product-narrative?utm_medium=feed&utm_source=Symfony%20Blog%20Feed
https://redd.it/1or189t
@r_php
Symfony
SymfonyCon Amsterdam 2025: From PR to launch: how code becomes product narrative (Symfony Blog)
🚨 New talk!Learn how small communication choices shape product impact. Celeste Van der Watt at SymfonyCon Amsterdam 2025, “From PR to launch: how code becomes product narrative”. ✨
🚀 I built a WebAuthn plugin for Laravel Jetstream + Livewire!
Hey everyone 👋
I’ve just released an open-source package I’ve been working on:
👉 [**r0073rr0r/laravel-webauthn**](https://github.com/r0073rr0r/laravel-webauthn)
It adds full **WebAuthn (passkeys, biometrics, USB keys)** support for **Laravel Jetstream + Livewire** — no external controllers, just native Livewire components.
# 🔧 What it does
* Register WebAuthn devices (fingerprint, Face ID, USB key, etc.)
* Login via WebAuthn directly through Livewire
* Works seamlessly with Jetstream (Livewire stack)
* Supports **Laravel 12**, **Livewire 3**, **Jetstream 5**, **PHP 8.2+**
# ⚙️ Installation
composer require r0073rr0r/laravel-webauthn
php artisan vendor:publish --provider="r0073rr0r\WebAuthn\WebAuthnServiceProvider"
php artisan migrate
Then include the JS file:
<noscript src="{{ asset('vendor/webauthn/webauthn/webauthn.js') }}"></noscript>
# 🧩 Usage
For registration (e.g., in your Jetstream profile page):
<livewire:webauthn-register />
For login (e.g., in your login page):
<livewire:webauthn-login />
That’s it — the components handle the WebAuthn challenge/response flow automatically.
# 💡 Why I built it
I love using Jetstream + Livewire for full-stack Laravel apps, but I couldn’t find a simple WebAuthn package that fit naturally into that ecosystem.
So I built one — fully Livewire-based, no JS frameworks, no extra controllers.
It’s lightweight, secure, and built to “feel native” inside Jetstream.
# 🛠️ Features
* Clean integration with Jetstream UI
* Configurable components (can publish & customize views)
* Works with existing user accounts
* Passkeys ready 🔐
* Open source (MIT)
💬 Feedback, ideas, and PRs are very welcome!
👉 [GitHub repo here](https://github.com/r0073rr0r/laravel-webauthn)
https://redd.it/1oqwcmc
@r_php
Hey everyone 👋
I’ve just released an open-source package I’ve been working on:
👉 [**r0073rr0r/laravel-webauthn**](https://github.com/r0073rr0r/laravel-webauthn)
It adds full **WebAuthn (passkeys, biometrics, USB keys)** support for **Laravel Jetstream + Livewire** — no external controllers, just native Livewire components.
# 🔧 What it does
* Register WebAuthn devices (fingerprint, Face ID, USB key, etc.)
* Login via WebAuthn directly through Livewire
* Works seamlessly with Jetstream (Livewire stack)
* Supports **Laravel 12**, **Livewire 3**, **Jetstream 5**, **PHP 8.2+**
# ⚙️ Installation
composer require r0073rr0r/laravel-webauthn
php artisan vendor:publish --provider="r0073rr0r\WebAuthn\WebAuthnServiceProvider"
php artisan migrate
Then include the JS file:
<noscript src="{{ asset('vendor/webauthn/webauthn/webauthn.js') }}"></noscript>
# 🧩 Usage
For registration (e.g., in your Jetstream profile page):
<livewire:webauthn-register />
For login (e.g., in your login page):
<livewire:webauthn-login />
That’s it — the components handle the WebAuthn challenge/response flow automatically.
# 💡 Why I built it
I love using Jetstream + Livewire for full-stack Laravel apps, but I couldn’t find a simple WebAuthn package that fit naturally into that ecosystem.
So I built one — fully Livewire-based, no JS frameworks, no extra controllers.
It’s lightweight, secure, and built to “feel native” inside Jetstream.
# 🛠️ Features
* Clean integration with Jetstream UI
* Configurable components (can publish & customize views)
* Works with existing user accounts
* Passkeys ready 🔐
* Open source (MIT)
💬 Feedback, ideas, and PRs are very welcome!
👉 [GitHub repo here](https://github.com/r0073rr0r/laravel-webauthn)
https://redd.it/1oqwcmc
@r_php
GitHub
GitHub - r0073rr0r/laravel-webauthn: Laravel Jetstream Livewire WebAuthn package for registration and login.
Laravel Jetstream Livewire WebAuthn package for registration and login. - r0073rr0r/laravel-webauthn
Just published event4u/data-helpers
During my time as a PHP developer, I often worked with DTOs. But there were always some problems:
Native DTOs don’t offer enough functionality, but they’re fast
Laravel Data has many great features, but it’s Laravel-only and quite slow
Generators aren’t flexible enough and have too limited a scope
So I developed my own package: `event4u/data-helpers`
You can find it here [https://github.com/event4u-app/data-helpers](https://github.com/event4u-app/data-helpers)
And the documentation here [https://event4u-app.github.io/data-helpers/](https://event4u-app.github.io/data-helpers/)
The goal was to create easy-to-use, fast, and type-safe DTOs.
But also to make it simple to map existing code and objects, map API responses directly to classes/DTOs, and easily access deeply nested data.
Here is an example, how the Dto could look like
// Dto - clean and type-safe
class UserDto extends SimpleDto
{
public function __construct(
#[Required, StringType, Min(3)]
public readonly string $name,
#[Required, IntegerType, Between(18, 120)]
public readonly int $age,
#[Required, Email]
public readonly string $email,
) {}
}
But that is not all. It also has a `DataAccessor` Class, that uses dot notations with wildcards to access complex data structures in one go.
// From this messy API response...
$apiResponse = [
'data' => [
'departments' => [
['users' => [['email' => 'alice@example.com'], ['email' => 'bob@example.com']]],
['users' => [['email' => 'charlie@example.com']]],
],
],
];
// ...to this clean result in a few lines
$accessor = new DataAccessor($apiResponse);
$emails = $accessor->get('data.departments..users..email');
// $emails = ['alice@example.com', 'bob@example.com', 'charlie@example.com']
Same for Dto's
But that is not all. It also has a `DataAccessor` Class, that uses dot notations with wildcards to access complex data structures in one go.
$userDto = UserDto::create(...); // or new UserDto(...)
$userDto->get('roles..name'); // returns all user role names
Or just use the DataMapper with any Object
class UserModel
{
public string $fullname;
public string $mail;
}
$userModel = new UserModel(
fullname: 'Martin Schmidt',
mail: 'martin.s@example.com',
);
class UserDTO
{
public string $name;
public string $email;
}
$result = DataMapper::from($source)
->target(UserDTO::class)
->template(
'name' => '{{ user.fullname }}',
'email' => '{{ user.mail }}',
)
->map()
->getTarget(); // Returns UserDTO instance
There are a lot of features, coming with this package. To much for a small preview.
That's why i suggest to read the documentation.
I would be happy to hear your thoughts.
https://redd.it/1orkcty
@r_php
During my time as a PHP developer, I often worked with DTOs. But there were always some problems:
Native DTOs don’t offer enough functionality, but they’re fast
Laravel Data has many great features, but it’s Laravel-only and quite slow
Generators aren’t flexible enough and have too limited a scope
So I developed my own package: `event4u/data-helpers`
You can find it here [https://github.com/event4u-app/data-helpers](https://github.com/event4u-app/data-helpers)
And the documentation here [https://event4u-app.github.io/data-helpers/](https://event4u-app.github.io/data-helpers/)
The goal was to create easy-to-use, fast, and type-safe DTOs.
But also to make it simple to map existing code and objects, map API responses directly to classes/DTOs, and easily access deeply nested data.
Here is an example, how the Dto could look like
// Dto - clean and type-safe
class UserDto extends SimpleDto
{
public function __construct(
#[Required, StringType, Min(3)]
public readonly string $name,
#[Required, IntegerType, Between(18, 120)]
public readonly int $age,
#[Required, Email]
public readonly string $email,
) {}
}
But that is not all. It also has a `DataAccessor` Class, that uses dot notations with wildcards to access complex data structures in one go.
// From this messy API response...
$apiResponse = [
'data' => [
'departments' => [
['users' => [['email' => 'alice@example.com'], ['email' => 'bob@example.com']]],
['users' => [['email' => 'charlie@example.com']]],
],
],
];
// ...to this clean result in a few lines
$accessor = new DataAccessor($apiResponse);
$emails = $accessor->get('data.departments..users..email');
// $emails = ['alice@example.com', 'bob@example.com', 'charlie@example.com']
Same for Dto's
But that is not all. It also has a `DataAccessor` Class, that uses dot notations with wildcards to access complex data structures in one go.
$userDto = UserDto::create(...); // or new UserDto(...)
$userDto->get('roles..name'); // returns all user role names
Or just use the DataMapper with any Object
class UserModel
{
public string $fullname;
public string $mail;
}
$userModel = new UserModel(
fullname: 'Martin Schmidt',
mail: 'martin.s@example.com',
);
class UserDTO
{
public string $name;
public string $email;
}
$result = DataMapper::from($source)
->target(UserDTO::class)
->template(
'name' => '{{ user.fullname }}',
'email' => '{{ user.mail }}',
)
->map()
->getTarget(); // Returns UserDTO instance
There are a lot of features, coming with this package. To much for a small preview.
That's why i suggest to read the documentation.
I would be happy to hear your thoughts.
https://redd.it/1orkcty
@r_php
GitHub
GitHub - event4u-app/data-helpers: Universal DTO & Mapping Solution (with SQL-like Array Querying): Framework-agnostic access to…
Universal DTO & Mapping Solution (with SQL-like Array Querying): Framework-agnostic access to Arrays, Models, and Requests with dot-notation, validation, and Route Model Binding support. - ...
Just published Multitron 1.0 - MIT-licensed beautiful CLI PHP Task Orchestrator library for large processes, exports, synchronizations, etc. Please give me your feedback!
https://github.com/riki137/multitron
https://redd.it/1orpuwd
@r_php
https://github.com/riki137/multitron
https://redd.it/1orpuwd
@r_php
GitHub
GitHub - riki137/multitron: Library for executing and maintaining series of complex tasks
Library for executing and maintaining series of complex tasks - riki137/multitron
Designing A 2D Game Engine for PHP Update #2
https://youtu.be/UOftrD08Ujc
https://redd.it/1os2gy6
@r_php
https://youtu.be/UOftrD08Ujc
https://redd.it/1os2gy6
@r_php
YouTube
Phrost Update #2 - 2D Game Engine For PHP
Extension support, audio, fonts, live reload and reset, crash support.
Livewire Workflows
I just released my first package, Livewire Workflows, for easily creating multi-step workflows and form wizards from full-page Livewire components. The package provides for easy definition of workflows and guards, and handles route definition, navigation, and state management, offering helper methods for manual management. How can I improve this package to make it the most beneficial for you?
https://github.com/pixelworxio/livewire-workflows
https://redd.it/1osah5j
@r_php
I just released my first package, Livewire Workflows, for easily creating multi-step workflows and form wizards from full-page Livewire components. The package provides for easy definition of workflows and guards, and handles route definition, navigation, and state management, offering helper methods for manual management. How can I improve this package to make it the most beneficial for you?
https://github.com/pixelworxio/livewire-workflows
https://redd.it/1osah5j
@r_php
GitHub
GitHub - pixelworxio/livewire-workflows at madewithlaravel.com
Build multi-step workflows in Laravel / Livewire with zero boilerplate - GitHub - pixelworxio/livewire-workflows at madewithlaravel.com