PHP code example of flux-eco / value-object

1. Go to this page and download the library: Download flux-eco/value-object 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/ */

    

flux-eco / value-object example snippets



echo fluxValueObject\getNewUuid().PHP_EOL;

echo fluxValueObject\getCurrentTime().PHP_EOL;


echo Api::new()->createUuid()->getValue().PHP_EOL;

echo Api::new()->createCurrentTime()->getValue().PHP_EOL.PHP_EOL;;

Api::new()->createUuid()->equals('abc31a6c-250b-4051-aa01-2d4d31387def').PHP_EOL;
Api::new()->createCurrentTime()->equals('2022-04-04 20:01:03.000000').PHP_EOL;

a6431a6c-250b-4051-aa01-2d4d31387be9
2022-04-04 20:01:03.000000

false
true