Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.
Tadatoshi Tokutake edited this page May 25, 2015 · 18 revisions

Did you have disatisfactions for PHP standard functions?

php-utils help your development in PHP!

Walk Through

File's constitution

  • lib directory include the categorized library files.
    • cover.inc
    • error.inc
    • string.inc
    • debug.inc
    • general.inc
    • array.inc
    • array_of_array.inc
  • test directory include the test files for above files.
  • php-utils.php read above all libraries.

Try tests

You need to install PHP and PHPUnit in advance.
Notice that php-utils suppose to be used for PHP 5.3 or higher.

I actually installed them by $ sudo apt-get install php5 phpunit in Linux Mint 17.1.

After installation, type bellow commands in shell.

  1. $ git clone https://github.com/ttokutake/php-utils.git
  2. $ cd php-utils
  3. $ phpunit test
    (If you want to try each test separately, specify each file like $ phpunit test/ErrorTest.php.)

Try to use php-utils by interactive shell

I also recommend you to install php-cli. This enable to use interactive shell mode.

$ sudo apt-get install php5-cli php5-readline

After install above packages and move to the cloned directory, type bellow commands in shell.

$ php -a
php > require 'php-utils.php';
php > echoln(create_path([__DIR__, 'dir', 'folder']));

Above commands result in

/path/to/php-utils/dir/folder/ # UNIX
\path\to\php-utils\dir\folder\ # DOS

You got ready to use php-utils!

If you want to know each function, see below pages.

Clone this wiki locally