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 |
How to call php function from javascript using ajax?
What is the difference between apache vs niginx?
Tell me what is the use of "enctype" attribute in a html form?
What is Apache's configuration file typically called?
How do I stop php artisan serve in windows?
What is $$ in php?
Is php still relevant 2019?
Steps for the payment gateway processing?
How can I prevent sql-injection in php?
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
How to open a file in php?
Do you know how can we check the value of a given variable is a number?