承接 hipparchus/pocketknife 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hipparchus/pocketknife

Composer 安装命令:

composer require hipparchus/pocketknife

包简介

A small collection of little pieces of PHP that I use over and over.

README 文档

README

A small collection of simple utilities for PHP.

safeString / sf

This checks a string against a regular expression (it includes a default which only allows string compose of alphanumeric characters and underscores). It accepts a second argument: a different regular expression to be used in place of the default.

It returns the string if it is safe, and boolean 'false' if it isn't.

cleanString / sc

This returns a string that has been cleaned based on a regular expression (it includes a default which matches only alphanumeric characters and underscores) and a replacement character (which defaults to nothing, i.e. it just removes unsafe characters). It accepts a second argument (the replacement character) and the third argument (the regular expression). Passing "null" to the second or third arguments will cause the function to use the its defaults.

It will return a cleaned version of the string.

inspect / i

This returns an object/array dump wrapped in a <pre> element so that it will be nicely formatted. If the second argument is true (the default) the method will use print_r; if it is false the method will use var_dump. var_dump will truncate nested items at a certain level; print_r will not. var_dump will return information about node types, however, while print_r simply returns the values.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固