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 […]
Heredoc PHP Heredoc PHP syntax is a way to write large bloc of text inside PHP, without the classic single quote, double quotes delimiters. It relies on <<< and a token that will also mark the end of the string. <?php $string = <<<STRING $x elephpants STRING ; ?> Heredoc has also the Nowdoc alternative, that […]
Exakat is proud to be a part of PHP Barcelona Conference 2015. PHP Barcelona is the premium conference of the PHP community in South Europe. Damien Seguy will present our gremlin experience in using graph approach to build a PHP abstract syntax tree. Join Damien the 31th at 18:00 in the main room for the […]
Before coding, we all want to produce clean, smart and efficient code. During coding, we keep the eye on the target, and when we’re done, the result is usually not what we expected. There is always room for improvement. Improvement may come in various flavors: corner cutting, PHP specific gotcha, migration or even old habits that […]
Static analysis refers to the review of code without executing it. Such review may be done as a phase of a coding project, or naturally occurring when the code is handed to a new programmer (That new programmer may also be yourself, six months later). In both case, the goal is to spot defects by […]
Install Gremlin for Neo4j 2.2 At the heart of the Exakat engine, we use Gremlin and Neo4j. Neo4j is the graph database, and Gremlin is the graph traversal language. Until today (2015, August 20th), Neo4j 2.2 had no working plug-in for Gremlin, which made us use the latest neo4j 2.1.8, but miss all the effort […]
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 […]
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 […]
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 […]
Isolated blocks 4 % of PHP code has a strange sickness : isolated block. Blocks are a sequence of instructions that are grouped together in the code : blocks are marked with curly braces, and they are usually found after a flow control command, such as if…then, for or switch to group several instruction under the same branching. […]