PHP code example of hao / hao-php-sdk

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

    

hao / hao-php-sdk example snippets


$arr = [
   ['id' => 1,'prize' => '一等奖', 'v' => 1],
   ['id' => 2,'prize' => '二等奖', 'v' => 1],
   ['id' => 3,'prize' => '三等奖', 'v' => 100],
   ['id' => 4,'prize' => '谢谢参与', 'v' => 1000],
];
$class = \PHPSDK\Loader::get('Prize');
$result = $class->init($arr);
dump($result);