Keep scrolling down for answers and more stats ...
1.
What does PHP stand for?
Proper Hypertext Processor
✓
PHP: Hypertext Preprocessor
✓
2.
How do you declare a variable in PHP?
3.
How do you declare a array in PHP?
4.
How do you declare a function in PHP?
function myFunction(parameters) {body}
✓
new function myFunction(parameters) {body}
✓
myFunction(parameters) {body}
✓
string myFunction(parameters) {body}
✓
5.
Which loops does PHP support?
6.
How do you import a file in PHP?
include 'file.php, read';
✓
import 'file.php, read';
✓
7.
How do you define a class in PHP?
8.
Select the correct code. (Can be more than 1)
function myMessage() { echo "Hello world!"; }
✓
$greet = function($name) { echo"Hello world!"; };
✓
class Fruit {public $name; public $color; function set_name($name) { $this->name = $name; } function get_name() { return $this->name; } }
✓
9.
Which of the below is correct?
Try/catch does not catch errors.
✓
Try/catch works for warnings.
✓
PHP can interact with DOM.
✓
10.
Which one of these is a datatype in PHP?
11.
How do you access the headers, paths, and script locations.
12.
How do you read a file in PHP?
read(readfile(filename););
✓
file_get_contents(filename);
✓
13.
How do you call a private static variable inside a function of a class?
14.
How do you declare a constructor in PHP?
function _constructor(){}
✓
function __constructor() {}
✓
function __construct() {}
✓