Interview :: PHP
11) List some of the features of PHP7.
- Scalar type declarations
- Return type declarations
- Null coalescing operator (??)
- Spaceship operator
- Constant arrays using define()
- Anonymous classes
- Closure::call method
- Group use declaration
- Generator return expressions
- Generator delegation
- Space ship operator
12) What is "echo" in PHP?
13) What is "print" in PHP?
14) What is the difference between "echo" and "print" in PHP?
Echo can output one or more string but print can only output one string and always returns 1.
Echo is faster than print because it does not return any value.
15) How a variable is declared in PHP?
16) What is the difference between $message and $$message?
17) What are the ways to define a constant in PHP?
18) What are magic constants in PHP?
19) How many data types are there in PHP?