1、mt_rand(min,max):随机返回min,max之间的随整数机数。

2、date('Y-m-d H:m:s',时间戳),将时间戳格式化为相应的时间格式。time()取得时间戳

3、array_merge($arr1,$arr2) 将两个数组合并,如果两个数组存在相同键名,则后面数组值覆盖前面数组

4、defined(CONSTANTNAME),检测常量是否定义,返回值为True False

5、preg_match(mode,string,arr),返回一个正则表达式匹配,mode为正则表达式,string字符串,arr为返回结果数组,另preg_match_all返回所有匹配项。

6、str_replace(find,replace,string,count) 字符替换

7、strtotime($string),将任意文本类型的时间转化为Unix时间戳。

8、strtolowerstrtoupper字符大小写转换。

9、round(number,小数位数),四舍五入保留小数位数

10、substr($string,start,length)截取字符串函数

11、intval()将变量转化为整型

12、array_change_key_case() 函数将数组的所有的 KEY 都转换为大写或小写。参数CASE_LOWER(默认值) CASE_UPPER

13、array_slice(array,offset,length,preserve),从数组中取一段值,array取值数组,offset开始位置,length长度,preserve是否保留原键值

14、array_splice(array,offset,length,array),从数组中移除一段值,array操作数组,offset开始位置,length长度,array替代数组

15、strip_tags(string,allow)函数剥去 HTML、XML 以及 PHP 的标签。

16、floor($num) 函数向下舍入为最接近的整数。

PHP函数积累的更多相关文章

  1. oracle常用函数积累

    --oracle常用函数积累-- --1.字符串长度:LENGTH ,语法: CONCAT(string) --示例 select LENGTH('AA_BB') from dual;--结果:5 - ...

  2. PHP函数积累总结(Math函数、字符串函数、数组函数)

    Math函数:10个较常用标红.abs — 绝对值acos — 反余弦acosh — 反双曲余弦asin — 反正弦asinh — 反双曲正弦atan2 — 两个参数的反正切atan — 反正切ata ...

  3. php 函数积累第一天

    htmlspecialchars 函数格式化表单输入的转化为html形式 exit - 输出一个消息并且退出当前脚本 list() 用一步操作给一组变量进行赋值. <?php$info = ar ...

  4. UNIX 网络编程知识,函数积累

    1: fprintf()#include <stdio.h> int fprintf( FILE *stream, const char *format, ... );fprintf()函 ...

  5. JavaScript 小函数积累及性能优化

    获取值的类型: var toString = Object.prototype.toString; function getType(o) { return toString.call(o).slic ...

  6. mysql函数积累

    group_concat(),手册上说明:该函数返回带有来自一个组的连接的非NULL值的字符串结果.比较抽象,难以理解. 通俗点理解,其实是这样的:group_concat()会计算哪些行属于同一组, ...

  7. Oracle 常用函数积累

    ①length 函数说明:计算字符串长度的函数 返回结果:数字 使用图解: ②lengthb 函数说明:计算字符串字节长度.在学习过程中,了解到还有一个 lengthb 函数.字节和字符的区别 返回结 ...

  8. 一些php常用函数积累

    本文链接 <?php // id: ecffe70d3af54df9bad97b61918ace7d global $ct_path, $ct_log_path; $log_path = &qu ...

  9. MySQL 函数积累

    IFNULL(expr1,expr2) // 如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2.IFNULL()返回一个数字或字符串值 IF(expr1,expr2,e ...

随机推荐

  1. InitParam与ContextParm的异同

    web.xml里面可以定义两种参数:(1)application范围内的参数,存放在servletcontext中,在web.xml中配置如下: xml 代码 <context-param> ...

  2. Juicy Couture_百度百科

    Juicy Couture_百度百科 Juicy Couture

  3. Element DOM Tree jQuery plugin – Firebug like functionality | RockingCode

    Element DOM Tree jQuery plugin – Firebug like functionality | RockingCode Element DOM Tree jQuery pl ...

  4. request.getParameterValues与request.getParameter的差别

    一. 简单的对照 request.getParameter用的比較多,相对熟悉 request.getParameterValues(String   name)是获得如checkbox类(名字同样, ...

  5. 在unity 脚本中获取客户端的IP地址

    需要using System.Net.NetworkInformation;原理就是获取网卡的信息. //下面这段代码是我在百度贴吧找来的,经检验是正确的 string userIp = " ...

  6. activity的横屏和竖屏设置

    主要在清单文件这样配置: <application android:allowBackup="true" android:icon="@drawable/ic_la ...

  7. 解决 Tomcat reload WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but fail

    转自:http://www.cnblogs.com/interdrp/p/5632529.html 我的错误如下: 06-Sep-2016 18:57:10.595 WARNING [localhos ...

  8. Median of Sorted Arrays

    (http://leetcode.com/2011/03/median-of-two-sorted-arrays.html) There are two sorted arrays A and B o ...

  9. Problem B The Blocks Problem(vector的使用)

    题目链接:Problem B 题意:有n块木块,编号为0~n-1,要求模拟以下4种操作(下面的a和b都是木块编号) 1. move a onto b: 把a和b上方的木块全部归位,然后把a摞在b上面. ...

  10. Sqoop mysql 数据导入到hdfs

    1.--direct 模式使用mysqldump 工具,所以节点上需要安装该工具,非direct 模式直接使用jdbc ,所以不需要 具体script参考如下: sqoop import --conn ...