3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] final class Route { public function __construct(public ?string $serializationGroups = null) {} } #[Route( name: 'show_book_with_serialization_groups', path: '/book/{id}', controller: 'app.controller.book:showAction', serializationGroups: ['sylius'] )] final class TestRoute {} $testRoute = new TestRoute; $reflection = new ReflectionObject($testRoute); $routeAttributes = $reflection->getAttributes(Route::class); var_dump($routeAttributes[0]->getArguments());
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["name"]=> string(35) "show_book_with_serialization_groups" ["path"]=> string(10) "/book/{id}" ["controller"]=> string(30) "app.controller.book:showAction" ["serializationGroups"]=> array(1) { [0]=> string(6) "sylius" } }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.81 ms | 900 KiB | 4 Q