编程语言:PHP
Optimizing PHP performance by using fully-qualified function calls
Today, a little conversation on Twitter escalated rather quickly. Apparently PHP runs function calls differently depending on namespaced or non namespaced context. When calling functions in a…
PHP7扩展开发之常量定义
这次,我们将演示如何在PHP扩展中定义一个常量。要实现的PHP代码如下: 12345678<?php define("ARR"
PHP7扩展开发之字符串处理
这次,我们来看看字符串在PHP扩展里面如何处理。 示例代码如下: 12345678910111213141516<?php
亿级用户PC主站的PHP7升级实践
那么问题来了,PHP是最好的语言吗?
PHP5 升级到PHP7时curl注意事项
(从大量的CLOSE_WAIT发现的问题) 脚本: <?php $url = $argv[1]; $mm = array(); function curl($url) { global $mm; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); #curl_setopt($ch, CURLOPT_HTTPHEADER,…
PHP7扩展开发之传参与返回值
这次,我们将演示如何在PHP扩展中接受传入的参数和输出返回值。 <?php function default_value ($type, $value = null) { if ($type == "int") { return $value ?? 0; } else if ($type == "bool") { return $value ?? false; } else if ($type…
PHP 7 Arrays : HashTables
There isn't a GitHub Pages site here. If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account. GitHub Status…
Speeding-up autoloading on PHP 5.6 & 7.0+ for everyone
At Blackfire.io we love Open-Source. We're thrilled to contribute a performance enhancement that will benefit almost everyone in the PHP community.
Fix 502 error on php-fpm service reload
In default configuration php-fpm produces errors 502(bad gateway) on reloading. This is really annoying, if you need to do it often. For example, if you use tool like deployer to deploy your…
逆天:蘑菇街下单平台演进,从PHP到Java
蘑菇街下单平台演进 | 朱伟 | 中生代技术分享第二十三期
Differences between array_replace and array_merge in PHP
I am trying to figure out the differences between array_replace() and array_merge(). The question actually came to my mind after this post : PHP array_merge empty values always less prioritar, wher...
PHP execute_data
24 March 2016 这阵子想研究下PHP Generator的实现,发现对于Generator很重要的一个数据结构为_zend_execute_data,在PHP源码中通常是一个execute_data变量,与该变量相关的宏是#define EX(element) execute_data.element。…