About php 7:
- PHP 7
was released in December 2015.
- The
main reason behind the PHP7 after PHP5.X is, PHP6 had already existed in the
past as an experimental project but never reached the production phase and also
there had been many resources available about PHP6.
Features of php 7:
- PHP7
can boost your application development by using the latest resources.
- It boosts
application execution twice but you will also need fewer servers to serve the
same amount of users.
- It
improves Error Handling where you replace fatal and catchable fatal errors with
exceptions.
- It
allows you to access class member on cloning of class.
- It
allows you to create Anonymous classes.
-
Anonymous classes are useful for simple one-off objects. With these classes,
you can define a class and instantiate an object inline.
-
Example:
class
Category {
}
$category
= new Category {
public
function getCategory() {
return
"home";
}
};
Comments
Post a Comment