Can a private static member be accessed from a public static method of the same class?
You have a variable $test that contains sub-strings divided by a dash ("-"). How can you put every sub-string into an array element easily?
Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)
PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...
When checking whether two English words are pronounced alike, which function should be used for the best possible result?
Which technique should be used to speed up joins without changing their results?
Consider the following code:
strspn($test, 'aeiou', 1);
The variable $test contains the string "You get certified".
What will the function call return?
What is the output of the following code?
printf('%4$d %2$s sit on 2 trees and eat %3$3.2f %1$s', "bananas",
"monkeys", 9, 99);
Which combination of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
A/hen comparing prepared statements and regular, application-constructed SQL statements, which of the following is true?
What is the name of the method that can be used to provide read access to virtual properties in a class?
You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call:
strcasecmp('hello my dear!', 'Hello my DEAR!');
The function call returns "0". What does that mean?
What function can reverse the order of values in an array without the loss of key information?
What super-global should be used to access information about uploaded files via a POST request?
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?
When uploading a file to a PHP script using the HTTP PUT method, where would the information about this file be available?
What XML component does the following XPath query try to match?
//foo[bar/@id=5]
Which PHP function relieves a 1st of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?
What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));
What is the difference between isset() and other is_*() functions (is_alpha(), is_number(), etc.)?
When working with the MVC paradigma, the business logic should be implemented in which of the following components?
Which of the following code snippets is correct? (Choose 2)
a)
interface Drawable {
abstract function draw();
}
b)
interface Point {
function getX();
function getY();
}
c)
interface Line extends Point {
function getX2();
function getY2();
}
d)
interface Circle implements Point {
function getRadius();
}
Given a php.ini setting of:
default_charset = utf-8
What will the following code print in the browser?
In a shared hosting environment, session data can be read by PHP scripts written by any user. How can you prevent this?
Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "Id"):
PHP code (assume the PDO connection is correctly established):
Consider the following code. Which keyword should be used in the line marked in bold to make this code work as intended?
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string? (Choose 2)
What is the content of $c after the following code has executed?
$a = 2;
$b = 3;
$c = ($a++ * ++$b);
How can the line on which HTTP headers were sent inside a script be determined?
Which of the following statements about database connections are commonly true? (Choose 2)
You want to run the following PHP 4 code with PHP 5. In the following example, which access modifier in PHP 5 is equivalent to "var"?
class Test {
var $tester;
}
Which of the following data types cannot be directly manipulated by the client?
What will the $array array contain at the end of this script?
1
2 function modifyArray (&$array)
3 {
4 foreach ($array as &$value)
5 {
6 $value = $value + 1;
7 }
8
9 $value = $value + 2;
10 }
11
12 $array = array (1, 2, 3);
13 modifyArray($array);
14 ?>
Which one of the following technologies was not built into PHP before version 5?
Which DOMElement property provides a reference to the list of Element's children?
What is the name of the key in $_FILES['name'] that contains the number of bytes of the uploaded file?
Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?
What is the return value of the following code substr_compare("foobar", "bar", 3);
Which constant must be passed as the second argument to htmlentities () to convert single quotes (') to HTML entity?