-
详解在PHP中password_hash的功能
[PHP教程] 2022-06-24 13:04:28 108人阅读
password_hash 传统的用户名和密码都采用加盐的方式存储加密信息,盐值也需要存储。 自PHP5.5.0之后,新增加了密码散列算法函数(password_hash),password_hash() 使用足够强度的单向散列算法创建密码的散列(hash...[详细]
-
详解PHP中php switch的方法示例
[PHP教程] 2022-06-24 13:04:00 196人阅读
php switch switch 语句类似于具有同一个表达式的一系列 if 语句。很多场合下需要把同一个变量(或表达式)与很多不同的值比较,并根据它等于哪个值来执行不同的代码。 示例: ?php switch (n) { case label1: 如果 ...[详细]
-
基于PHP的extract的用法细解
[PHP教程] 2022-06-24 13:03:32 109人阅读
extract 函数从数组中将变量导入到当前的符号表。 该函数使用数组键名作为变量名,使用数组键值作为变量值。针对数组中的每个元素,将在当前符号表中创建对应的一个变量。 第二个参数 type 用于指定当某个变量已经存...[详细]
-
PHP之curl_multi并发详解方法介绍
[PHP教程] 2022-06-24 13:02:45 109人阅读
PHP中curl_multi并发详解 PHP中的curl_multi系列函数可以实现同时请求多个URL来实现并发,而不是像普通curl函数那样请求后会阻塞,直到结果返回才进行下一个请求。因此在批量请求URL时可通过curl_multi系列函数提升...[详细]
-
详解在PHP中self关键字
[PHP教程] 2022-06-24 13:01:20 182人阅读
解析PHP的self关键字 PHP群里有人询问self关键字的用法,答案是比较明显的: 静态成员函数内不能用this调用非成员函数,但可以用self调用静态成员函数/变量/常量; 其他成员函数可以用self调用静态成员函数以及非静...[详细]
-
php魔术方法概述
[PHP教程] 2022-06-24 13:00:34 137人阅读
前面的话 php在面向对象部分有很多相关的魔术方法,这些方法为面向对象实现提供了便利,本文将详细介绍魔术方法 构造方法 大多数类都有一种称为构造函数的特殊方法。当创建一个对象时,它将自动调用构造函数,通常用...[详细]
-
集结php比较常用前端语法
[PHP教程] 2022-06-24 12:59:48 163人阅读
php常用前端语法整理收集 以下为前端常用php语法: // 定义变量 !--{eval $colSize = sizeof($navlist);}-- !--{eval $vip_level_points = array(0, 10000, 20000, 35000, 50000, 75000);}--//数组 !--{eval $cur_le...[详细]
-
区别在PHP中new self和 new static
[PHP教程] 2022-06-24 12:58:57 105人阅读
PHP中new self() 和 new static() 的区别 new static() 是在php5.3版本引入的新特性 new static 和 new self() 都是 new 一个对象 直接看代码: class Father { public function getNewFather() { return new self()...[详细]
-
解决PHP strtotime的BUG
[PHP教程] 2022-06-24 12:58:38 53人阅读
PHP strtotime的BUG处理 最近使用了strtotime结合-1 month, +1 month, next month获取上个月或者下个月的日期,不过刚看到一篇文章,才知道原来使用strtotime直接获取日期还是有点小BUG BUG 如日期: $today = 2020-...[详细]
-
详解php里的几种常见排序方法附代码
[PHP教程] 2022-06-24 12:58:02 123人阅读
PHP有多种排序方法,本篇文章给大家介绍几种常见的排序方法:冒泡排序、交换法排序、选择法排序、插入法排序、快速排序。希望对大家有所帮助。 排序方法1:冒泡排序 function BubbleSort($arr) { // 获得数组总长度 ...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]