php多态
发表于|更新于|php
通过接口
A有B和C两个实现,但是起实现方法是不同的,这就是PHP多态
文章作者: developer
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Dev!
相关推荐
2015-09-20
php魔术方法__call和__callStatic
__call($name,$arguments)当对象访问不存在时候,__call被调用 __callStatic当对象访问不存在的静态方法时候,__callStatic被调用定义时也要把__callStatic定义为静态方法public static __callStatic($name,$arguments)使用两个点访问静态方法test::runtest();
2015-09-20
php魔术方法 __clone
当你使用clone关键字时,__clone 就会触发
2015-09-10
mysql_error
mysql_error() 函数返回上一个 MySQL 操作产生的文本错误信息。本函数返回上一个 MySQL 函数的错误文本,如果没有出错则返回 ‘’(空字符串)。
2019-08-30
php SplQueue php标准库 队列 和数组 性能差异
数组模拟队列12345678910111213141516171819$t1 = microtime(true);$arrq = array();for ($i = 0; $i < 100000; $i++) { $data = "hello $i\n"; array_push($arrq, $data); if ($i % 100 == 99 and count($arrq) > 100) { $popN = rand(10, 99); for ($j = 0; $j < $popN; $j++) { array_shift($arrq); } }}$popN = count($arrq);for ($j = 0; $j < $popN; $j++) { array_shift($arrq);}$t2 = microtime(true);echo ($t2 -...
2018-10-07
php opcache 指定目录 不缓存
https://blog.csdn.net/hoooooly/article/details/82593558配置文件 1opcache.blacklist_filename=/usr/local/php/etc/opcache-blacklist.txt opcache-blacklist.txt的内容为 1/home/wwwroot/website/test.appname.com/*
2015-09-10
mysql_insert_id
mysql_insert_id获得mysql查询后的自增主键的id
公告
This is my Blog