core
core copied to clipboard
PHP 8 named arguments support
PHP named arguments helps in some situations for cleaned code, it locks library maintainers to not change the argument names so easily without breaking changes, but php 8 must have support too...
public function test_static_route(): void {
Flight::request()->url = '/test';
$route = Flight::route(
pass_route: true,
alias: 'testRoute',
callback: function () {
echo 'test';
},
pattern: '/test'
);
self::assertInstanceOf(Route::class, $route);
self::expectOutputString('test');
Flight::start();
}