PHP code example of php-prefixer / prefixed-illuminate-support

1. Go to this page and download the library: Download php-prefixer/prefixed-illuminate-support 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 / prefixed-illuminate-support example snippets


/**

$ composer install
$ php test.php

Sample date: 2021-12-17 12:00:24

*/
;

$immutableDate = CarbonImmutable::now();

Collection::make([$immutableDate])->each(function ($date) {
    echo "\nSample date: {$date->toDateTimeString()}\n\n";
});

/**

$ env COMPOSER=composer_laravel_6.json composer install
$ env COMPOSER=composer_laravel_8.json composer install
$ php test.php

Sample date: 2021-12-17 12:00:24

*/
ow();

Collection::make([$immutableDate])->each(function ($date) {
    echo "\nSample date: {$date->toDateTimeString()}\n\n";
});