How can you do this?
You work for a shared hosting provider, and your supervisor asks you to disable user scripts to
dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)
Which of the following statements is NOT true?
Which of the following statements is NOT true?
a) Class constants are public
b) Class constants are being inherited
c) Class constants can omit initialization (default to NULL)
d) Class constants can be initialized by consts
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
How many elements does the $matches array contain after the following function call is performed? preg_match(&
How many elements does the $matches array contain after the following function call is
performed?
preg_match(‘/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/’, ’21st March 2006′, $matches);
what will be the value of $a?
Given the following code, what will be the value of $a?
<code>
$a = array(‘a’, ‘b’);
array_push($a, array(1, 2));
</code>
Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
Identify the security vulnerability in the following example: <code> 1 <?php 2 echo "Welcome, {$
Identify the security vulnerability in the following example:
<code>
1 <?php
2 echo “Welcome, {$_POST[‘name’]}.”;
3 ?>
</code>
How many times will the function counter() be executed in the following code?
How many times will the function counter() be executed in the following code?
<code>
functioncounter($start, &$stop)
{
if($stop > $start)
{
return;
} counter($start–, ++$stop);
}
$start = 5;
$stop = 2;
counter($start, $stop);
</code>
When a class is defined as final it:
When a class is defined as final it:
Which parts of the text are matched in the following regular expression? <code> 1 <?
Which parts of the text are matched in the following regular expression?
<code>
1 <?php
2 $text = <<<EOT
3 The big bang bonged under the bung.
4 EOT;
5
6 preg_match_all(‘@b.n?g@’, $text, $matches);
7 ?>
</code>