PHP 7 – the new features at a glance – Part 2


Expactations can mark places in your code, which should not be reached actually, But if it is, can leave a message in the production environment, to other programmers to debug and understand the codes to help. The parameter expression is evaluated and a false value will raise an AssertionException thrown.


void assert (mixed $expression [, mixed $message]);

The php.ini configuration variable Zend.assertions can 3 Value be more…

PHP 7 – the new features at a glance – Part 1

PHP 7 is on everyone's lips and come with a number of syntactic enhancements and new features. In the future, PHP applications are not only faster, but the Java-language syntax approach further. Finally, you can set, which data types of functions in and which should come out again (Parameter type declarations and return type declarations), Thus the maintainability of the code can be improved.

Parameter type declarations and return type declarations

In PHP >= 5.3. was it previously possible function parameters, an input to assign an object type variable, the function expected, to generate other programmers that use the function to make it easier to document and an exception, When an object of a different type is used: more…