PHP 7 Static analysis tools With PHP 7 officially live, it it time to review code and get it ready for migration. It is now time to think about migrating code to the new version, taking advantage of new features et reduced server load. This means reviewing all the code : it may be too much […]
The Paris Open Source Summit, the premier European event centered on the Free & Open Source sector, is the result of the merger of two iconic Open Source events: Linux Solutions and the Open World Forum. Paris Open Source Summit attends the 18th and the 19th november 2015 at The Docks of Paris. The event strives […]
PHP Worl 2015 brings together the entire world of PHP into one location together. The idea is to bring everyone together to learn from each other and make the greater PHP community stronger for it. Damien Seguy, CTO of Exakat, will present the “Error messages in PHP 7” session based on our […]
PHP 7 is probably the ‘the easiest upgrade yet‘. After having checked that the old PHP 5.x is lintable with PHP 7, the next challenge is to read the ‘ backward incompatible changes‘ and see if it applies to the legacy code. The list is not long, and a quick text search will lead us […]
Manual Code Review used to be The established standard is one write the code, and another one review it. This is safe and sound: no one can both be judge and be judged. Times are changing and they won’t stay long that way. Manual code reviews are definitely good for team building : obviously, experienced developer […]
在为ClearPHP收集规则的时候一个总是回来的问题就是定义规则来源的领域。代码约定和概念覆盖不同的域而且很少会相互重叠。ClearPHP规则的目标是尽量接近语言和它的技巧,远离语义(semantics)和架构。为什么呢?
The art of PHP callback PHP callback are functions that may be called dynamically by PHP. They are used by native functions such as array_map, usort, preg_replace_callback, etc. Here is a reminder of the various ways to create a callback function in PHP, and use it with the native functions. String functions Strings are the […]
通过PHP静态变量进行缓存 当一段代码里在重复使用一个方法调用时,你也许会问如果把值本地缓存起来难道不会更有效率,这样完全避免函数调用而提高处理速度。让我来看看我们如何可能来使用缓存通过PHP的静态变量。
静态审计是一个帮助提高代码质量的非常好的工具。审计意味着写下的代码被一个外部的审计师审查。人工的审计者通常是最好的,虽然他们不是总是适用。静态审计提供一个代码审查的自动的方法,并能很快地接收到反馈。它系统性地检查每一个文件的每一行代码。它不针对同人工审核一样的违规实例,但是也带来一系列的很好地优势:
什么是接口? 接口,在PHP中也像在其他的面向对象(OOP)的语言中一样,定义在一个类中有哪些方法必须实现。接口给名字和参数以记录,但是没有内容:实际的(实现)代码将会要类来提供。 <?php interface movable { function move($distance) ; } class human implements movable { public function move($distance) { $this->walk($distance); } } class dog implements movable { public function move($distance) { $this->run($distance); // dogs never walk… } } class marsrover implements movable { public function move($distance) { for($i = 0; $i < $distance / […]
When come the time for preparing a new server, there is always the dreaded question of configuration. Which directives have to be configured in php.ini. Certainly, we have (and love) the phpinfo() function, that displays the current configuration of a server. It is so useful to check that one directive has the good value or […]