What is the output of the following code?
What is the output of the following code? class Number { private $v; private static $sv = 10;
public function __construct($v) { $this->v = $v; } public function mul() { return static function
($x) { return isset($this) ? $this->v*$x : self::$sv*$x; }; } } $one = new Number(1); $two =
new Number(2); $double = $two->mul(); $x = Closure::bind($double, null, ‘Number’); echo
$x(5);
Which of the following statements about anonymous functions in PHP are NOT true?
Which of the following statements about anonymous functions in PHP are NOT true?
(Choose 2)
What will be the result of the following operation?
What will be the result of the following operation? $a = array_merge([1,2,3] + [4=>1,5,6]);
echo $a[2];
Which of the following functions will allow identifying unique values inside an array?
Which of the following functions will allow identifying unique values inside an array?
which of the following is true?
When using password_hash() with the PASSWORD_DEFAULT algorithm constant, which
of the following is true? (Choose 2)
Which of the following are NOT acceptable ways to create a secure password hash in PHP?
Which of the following are NOT acceptable ways to create a secure password hash in PHP?
(Choose 2)
What is the preferred method for preventing SQL injection?
What is the preferred method for preventing SQL injection?
Which of the following does NOT help to protect against session hijacking and fixation attacks?
Which of the following does NOT help to protect against session hijacking and fixation
attacks?
Is the following code vulnerable to SQL Injection…
Is the following code vulnerable to SQL Injection ($mysqli is an instance of the MySQLi
class)? $age = $mysqli->real_escape_string($_GET[‘age’]); $name =
$mysqli->real_escape_string($_GET[‘name’]); $query = “SELECT * FROM `table` WHERE
name LIKE ‘$name’ AND age = $age”; $results = $mysqli->query($query);
http_response_code($code);
Please provide the value of the $code variable in the following statement to set an HTTP
status code that signifies that the requested resource was not found.
http_response_code($code);