What are some new features introduced in php7?



What are some new features introduced in php7?..

Answer / Yashu Mathur

PHP 7 introduced several important features, including:
1. Scalar Type Declaration - Allowing developers to declare the types of variables at the time of declaration for better type safety and improved performance.
2. Return Type Declaration - Enabling developers to specify the return type of a function or method.
3. Anonymous Classes - Allowing the creation of a class without giving it a name.
4. Spaceship operator (<=>) - A new comparison operator that returns 0, 1 or -1 for equal, greater than and less than respectively.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How to call php function from javascript using ajax?

1 Answers  


What is the difference between apache vs niginx?

1 Answers  


Tell me what is the use of "enctype" attribute in a html form?

1 Answers  


What is Apache's configuration file typically called?

1 Answers  


How do I stop php artisan serve in windows?

1 Answers  


What is $$ in php?

1 Answers  


Is php still relevant 2019?

1 Answers  


Steps for the payment gateway processing?

1 Answers  


How can I prevent sql-injection in php?

1 Answers  


class Database { public static $_instance; public static function getInstance() { if(!isset(self::$_instance)) self::$_instance = new Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME); print_r(self::$_instance); return self::$_instance; } } can any one explain "self::$_instance = new Database(DB_SERVER, DB_USER, DB_PASS, DB_NAME);" this line

1 Answers  


How to open a file in php?

1 Answers  


Do you know how can we check the value of a given variable is a number?

1 Answers  


Categories