PHP code example of qlwz / mock

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

    

qlwz / mock example snippets


use qlwz\mock\Mock;

$jsonStr = '{"string|1-10": "★"}';
var_dump(Mock::mock(json_decode($jsonStr)));

$ary = [
    "string|1-10" => "★"
];
var_dump(Mock::mock($ary));

var_dump(Mock::mock('@url'));