PHP code example of php-prefixer / php-prefixer-cli

1. Go to this page and download the library: Download php-prefixer/php-prefixer-cli 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/ */

    

php-prefixer / php-prefixer-cli example snippets


namespace Carbon;

use Carbon\Exceptions\InvalidDateException;
use DateInterval;
use Symfony\Component\Translation;

class Carbon extends DateTime
{
    const NO_ZERO_DIFF = 01;
...

namespace ACME\Carbon;

use ACME\Carbon\Exceptions\InvalidDateException;
use DateInterval;
use ACME\Symfony\Component\Translation;

class Carbon extends DateTime
{
    const NO_ZERO_DIFF = 01;
...
sh
composer global 
bash
# Sample command-line
./php-prefixer-cli prefix \
\
    /sample/acme_project \
\
    /output/prefixed_project \
\
    "789|1234567890123456789012345678901234567890" \
\
    123456 \
\
    --github-access-token=1234567890123456789012345678901234567890
bash
git clone https://github.com/php-prefixer/php-prefixer-cli
bash
cd php-prefixer-cli
bash
./php-prefixer-cli app:build