PHP code example of riverwaysoft / php-converter
1. Go to this page and download the library: Download riverwaysoft/php-converter 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/ */
riverwaysoft / php-converter example snippets
use Riverwaysoft\PhpConverter\Filter\Attributes\Dto;
#[Dto]
class UserOutput
{
public string $id;
public int $age;
public ?UserOutput $bestFriend;
/** @var UserOutput[] */
public array $friends;
}
bash
composer
cp vendor/riverwaysoft/php-converter/bin/default-config.php config/ts-config.php
bash
vendor/bin/php-converter --from=/path/to/project/src --to=. --config=config/ts-config.php