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

Isolated Blocks

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

PHP skips some code

PHP skips some code When PHP skips some code, it features code optimizations : it skips automatically an instruction, as soon as it detects useless job. No need for code cache, this is plain vanilla PHP. Implied if The classic case is when using logical operators && or ||. When the first operand of an && […]

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