PHP code example of liuchang103 / hyperf-facade
1. Go to this page and download the library: Download liuchang103/hyperf-facade 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/ */
liuchang103 / hyperf-facade example snippets
Redis::get('key');
// 同等效果
$container = \Hyperf\Utils\ApplicationContext::getContainer();
$redis = $container->get(Hyperf\Redis\Redis::class);
$redis->get('key');
class Test
{
public $foo = 0;
public function foo($foo = 0)
{
$this->foo += $foo;
print_r($this->foo);
}
}