jalet/util-sprintf
Composer 安装命令:
composer require jalet/util-sprintf
包简介
PHP's sprintf for named params with type casting.
README 文档
README
PHP's sprintf for named params with type casting.
use Jalet\Util\Sprintf; echo Sprintf::f("I am %age:int% years old.", array('age' => '25y')); // I am 25 years old. echo Sprintf::f("Oh my god, it's %val:bool:str%.", array('val' => 1)); // Oh my god, it's true. echo Sprintf::f("My cat is %color%.", array('color' => 'brown')); // My cat is brown. echo Sprintf::f("INSERT INTO table (username, active) VALUES ('john.doe', %active:bool%);", array('active' => false)); // INSERT INTO table (username, active) VALUES ('john.doe', 0);
统计信息
- 总下载量: 29.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-11-30