PHP code example of jordimorillo / uid
1. Go to this page and download the library: Download jordimorillo/uid 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/ */
jordimorillo / uid example snippets
use JordiMorillo\Uid\Uid;
class MyProductId extends Uid {}
$myProductId = new MyProductId();
echo "$myProductId"; //This should cast the identifier as a string of numbers
$myProductIdString = $myProductId->toString();
$anotherProductId = new MyProductId($myProductIdString); //This should be a similar equal as $myProductId