PHP code example of eno2050 / phptools

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

    

eno2050 / phptools example snippets


    use Eno2050\Phptools\Traits\Singleton;

    class user {
        use Singleton;
        public function sayHello(){
            return 'hello world';
        }
    }
    
    $user = User::getInstance();
    echo $user->sayHello();
	
	@param array $arr 要转换的数组
	@param boolean $flag 默认true 转换成大写
	@return array
	public function changeKeyCase(array $arr, $flag = true);