-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphp-utils.php
34 lines (27 loc) · 974 Bytes
/
php-utils.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
/**
* This file is part of the php-utils.php package.
*
* Copyright (C) 2015 Tadatoshi Tokutake <[email protected]>
*
* Licensed under the MIT License
*/
define('PHP_INT_MIN', ~PHP_INT_MAX);
/**
* Return the path with DIRECTORY_SEPARATOR.
*
* @param array $dirs
* @return string
*/
function create_path(array $dirs)
{
return array_reduce($dirs, function($path, $dir) { return "$path$dir" . DIRECTORY_SEPARATOR; }, '');
}
define('PATH_TO_LIB_FOR_PHP_UTILS', create_path(array(__DIR__, 'lib')));
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'cover.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'error.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'debug.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'general.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'string.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'array.inc' ;
require_once PATH_TO_LIB_FOR_PHP_UTILS . 'array_of_array.inc';