作者在 2012-11-26 01:37:46 发布以下内容
目的:实现一切都是对象的php
示例
- S('abc')->len() // 3
- S('abc')->reverse() // cba
- F(12.21)->floor() // 11
-
Db('mysql').config([server=>'local', name=>'test', user=>'test', pwd=>'123', port=>3306])
String类
S('abc')
-
cut
- first
-
has
-
in
- last
- len
-
replace
- reverse
-
split
- substr
-
to_a
-
to_f
-
to_i
Integer类
I(123)
- to_s
Array类
A([1,2,3])
- each
-
join
- map
-
select
- sort
-
to_array
-
to_s