定制 jalet/util-sprintf 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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);

Build Status

统计信息

  • 总下载量: 29.07k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-11-30