FILL BLANK Which PHP function is used to validate where the contents of $_FILES[`name'][`tmp_name'] have really been uploaded via HTTP, and also save the contents into another folder?
CORRECT TEXT
What is the output of the following code?
function increment (and$val)
{
return $val + 1;
}
$a = 1;
echo increment ($a);
echo increment ($a);
Which of the following techniques ensures that a value submitted in a form can only be yes or no ?
A. Use a select list that only lets the user choose between yes and no .
B. Use a hidden input field that has a value of yes or no .
C. Enable the safe_mode configuration directive.
D. None of the above.
Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)
A. Limit the amount of memory a script can consume
B. Limit the total amount of memory PHP uses on the entire server
C. Limit the maximum execution time of a script
D. Limit the maximum number of concurrent PHP processes
E. Limit the maximum number of concurrent PHP threads
You want to parse a URL into its single parts. Which function do you choose?
A. parse_url()
B. url_parse()
C. get_url_parts()
D. geturlparts()
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);
A. 5
B. 10
C. 50
D. Fatal error
Which of the following parts must a XML document have in order to be well-formed?
A. An XML declaration
B. A root element
C. A specified encoding
D. A reference to either a DTD or an XML schema definition
What function can be used to retrieve an array of current options for a stream context?
A. stream_context_get_params
B. stream_context_get_default
C. stream_context_get_options
D. The 'options' element of the stream_get_meta_data return value