New in PHP 7

New in PHP 7

New in PHP 7 Let’s review the new constants, functions, classes, interfaces and trait that PHP 7 features. We have reviewed the core of PHP (as of June 1rst) and spotted quite some new structures that are already available to you if you’re testing the water with PHP7. New Constants in PHP 7 In the core, […]

Code expiration

How code dies Code is born, grows, matures, decays and then dies. It may be seen as a living matter, just like the tulips in my garden. It is scary to transpose that image to code: little typo appearing, pieces of code disappearing, constants that changes their value over time (code inflation?), part of code […]

Magic numbers in PHP

Magic number is a literal value with unexplained meaning, that appears in the code multiple times. Such values will show no intent, and should be replace by a constant: the name of the constant will make the code more readable, and easier to update in the future. Hunting for Magic Numbers Let’s take a look […]

PHP Code Review Tools comparison : 4 tools of the market against Exakat

Why to use automated PHP Code Analysis Tools ? Traditional PHP Code Review demands an army of developers. Doing go PHP Code Review demands scarce experts. Sustainable PHP Code review demands tools that each uses to help manage the code. With the increasingly important of technical debt, in PHP as elsewhere, we’ve seen the last two […]

Well used interfaces in PHP

  What are interfaces ? Interfaces, in PHP as in all other OOP languages, specify what methods must be implemented in a class. Interfaces gives names and arguments counts, but no content : the actual code will be provided by the class. <?php interface movable {   function move($distance) ; } class human implements movable {   public function move($distance) […]

Clear php code : between coding convention and conception

One question that keeps coming back while collecting the rules for clearPHP is the domain of the rule. Coding convention and conception rules covered different domains and seldom overlay each other. ClearPHP rules aim a being close to the language and its tricks, away from semantics and architecture. How come ? Coding conventions Coding conventions are […]