PHP code example of xphp-lang / xphp-symfony-bundle

1. Go to this page and download the library: Download xphp-lang/xphp-symfony-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xphp-lang / xphp-symfony-bundle example snippets


// config/bundles.php
return [
    // ...
    Xphp\SymfonyBundle\XphpBundle::class => ['all' => true],
];

// src/Command/FindCommand.xphp  (a .xphp class — register it as a service)
#[AsCommand('app:find')]
final class FindCommand extends Command
{
    public function __construct(private readonly CachedFinder<User> $finder) {   // -> the specialization
        parent::__construct();
    }
}