3 Open source PHP 7 Static analysis tools

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 […]

Exakat at PHP World 2015 the 18th November to present PHP7 error message

      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 […]

The art of PHP callback

the art of PHP callback

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中也像在其他的面向对象(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 / […]