-
PHP trim小技巧:叫你删掉字符串两边的空格
[PHP教程] 2021-05-26 14:23:34 137人阅读
trim() 函数:去除字符串左右两边的空白字符和特殊字符; ltrim() 函数:去除字符串左边的空白字符和特殊字符; rtrim() 函数:去除字符串右边的空白字符和特殊...[详细]
-
为你解释PHP数组
[PHP教程] 2021-05-26 14:23:00 87人阅读
使用数组的目的,就是将多个相互关联的数据,组织在一起形成集合,作为一个单元使用,达到批量数据处理的目的。 什么是数组 数组就是一组数据的集合,把一系列数...[详细]
-
PHP定义数组分析
[PHP教程] 2021-05-26 14:21:30 63人阅读
1. 直接赋值的方式声明数组 当数组中每个元素都是一个具体的值而非一个数组时,我们称这样的数组为一维数组。一维数组在数组中是最简单的一种,也是最常用的一种...[详细]
-
PHP二维数组与多维数组密不可分
[PHP教程] 2021-05-26 14:21:00 200人阅读
1. 二维数组 二维数组和一维数组的声明方式一样,只是将数组中的一个或多个元素也声明成一个数组,同时也有直接为数组元素赋值和使用 array() 函数两种声明二维...[详细]
-
PHP指出参数类型
[PHP教程] 2021-05-26 05:11:51 95人阅读
指定参数类型为 class 类型的实例如下: ?php class C {} class D extends C {} //类D继承自类C class E {} functionf ( C $c ) { echo get_class ( $c ). \n ;...[详细]
-
PHP函数参数传达的多种方法
[PHP教程] 2021-05-26 05:11:17 113人阅读
值传递是 PHP 中函数的默认传值方式,也称为拷贝传值。顾名思义值传递的方式会将实参的值复制一份再传递给函数的形参,所以在函数中操作参数的值并不会对函数外...[详细]
-
PHP匿名函数中的闭包函数
[PHP教程] 2021-05-25 19:59:16 135人阅读
创建匿名函数 创建匿名函数很简单,其语法结构如下所示: function (参数列表) { ... } 可以看出,匿名函数与普通函数非常类似,同样可以接受参数,并且可以有返...[详细]
-
为你解析PHP回调函数
[PHP教程] 2021-05-25 19:58:28 136人阅读
PHP 中的回调函数与 C、Java 等语言的回调函数的作用是一模一样的,都是在函数执行的过程中,跳转到回调函数中,当回调函数执行完毕之后,再回到之前的函数处理...[详细]
-
什么是PHP可变函数
[PHP教程] 2021-05-25 19:57:18 166人阅读
需要注意的是,可变函数不能直接用于例如 echo、print、unset()、isset()、empty()、include、require 以及类似的语言结构,需要使用自己包装的函数来将这些结构...[详细]
-
PHP单引号与双引号的关系
[PHP教程] 2021-05-25 19:56:28 187人阅读
下面通过一些示例来具体说明一下这两者之间的去吧。 1) 对变量的解析不同 PHP 会解析双引号中的变量,而不会解析单引号中的变量。也就是说,如果使用单引号定义...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]