PHP code example of wuding / php-func

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

    

wuding / php-func example snippets


func ( mixed $function_config [, array $alias_classes = array() [ , mixed $... ]] ) : void

$Composer =  = [
    '_isset' => ['', [], '', null],
    '\Func\array_diff_kv' => ['', [], [], [], false],
    '\Func\Arr::diff' => ['\Func\diff', [], [], [], false],
    'str_match' => ['', '//', '', null, false],
    'wtf' => [function ($text) { return $text; }, 'hi'],
];

func($functions, ['Variable', 'Arr', 'PCRE']);
func('\Func\Str\unicode_decode', '', [], [], [], false);
new \Func\Alias('test', function ($text) { return $text; }, 'test');

echo str_match('/^\d+元/', '3元', '1角', true);
echo unicode_decode('\u65b0\u6d6a\u5fae\u535a', 'json');
echo test('str');