Diff for phpPlatonLib/Platon/Platon.php between version 1.41 and 1.42
| version 1.41, 2017/11/08 00:33:44 |
version 1.42, 2017/11/08 00:34:18 |
|
|
| * @access public |
* @access public |
| */ |
*/ |
| |
|
| /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.40 2017/11/08 00:28:30 nepto Exp $ */ |
/* $Platon: phpPlatonLib/Platon/Platon.php,v 1.41 2017/11/08 00:33:44 nepto Exp $ */ |
| |
|
| class Platon |
class Platon |
| { |
{ |
|
|
| * @param mix $element inserted element |
* @param mix $element inserted element |
| * @return array output array |
* @return array output array |
| */ |
*/ |
| static function array_insert($arr, $index, $element) |
static function array_insert($arr, $index, $element) /* {{{ */ |
| { |
{ |
| if (!is_array($arr)) { |
if (!is_array($arr)) { |
| return false; |
return false; |
|
|
| $before = array_splice($arr, 0, $index); |
$before = array_splice($arr, 0, $index); |
| array_push($before, $element); |
array_push($before, $element); |
| return array_merge($before, $arr); |
return array_merge($before, $arr); |
| } |
} /* }}} */ |
| |
|
| /** |
/** |
| * Returns english grammar related number. |
* Returns english grammar related number. |
Platon Group <platon@platon.org> http://platon.org/
|
|