PHP code example of renshan / randbuilder

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

    

renshan / randbuilder example snippets



$schema = array(
    "object" => array(
        "name" => array(
            "type" => "string",
            "length" => 10,
            "prefix" => "builder_",
            "end" => "_redliub",
            "unique" => true
        ),
        "hash" => array(
            "type" => "string",
            "length" => array(10,20),
            "reducer" => "md5"
        ),
        "number" => array(
            "type" => "integer",
            "range" => array(10, 100),
            "unique" => true
        ),
        "price" => array(
            "type" => "float",
            "range" => array(100, 1000),
            "precision" => 2
        )
    ),

    "count" => 10  // How many object will be make
);