200-710 Exam Questions
231 real 200-710 exam questions with expert-verified answers and explanations. Page 4 of 5.
- Question #151Security
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? (Choos...
dl() functiondisable_functionsphp.inishared hosting security - Question #152Security
When a browser requests an image identified by an img tag, it never sends a Cookie header.
HTTP cookiesbrowser behaviorCookie headerimg tag - Question #153Security
Which of the following techniques ensures that a value submitted in a form can only be yes or no ?
input validationserver-side validationform securitysafe_mode - Question #154Security
Which function can NOT help prevent cross-site scripting? (Choose 2)
XSS preventionaddslashesquotemetaoutput encoding - Question #155Security
Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?
htmlentitiesENT_QUOTESHTML entitiessingle quotes - Question #156Security
One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?
display_errorserror reportinginformation disclosurephp.ini - Question #157Security
Which of the following superglobals does not necessarily contain data from the client?
superglobals$_SESSIONclient dataPHP superglobals - Question #158Databases & SQL
Transactions are used to... (Choose 2)
transactionsdata consistencyACIDdatabase - Question #159Databases & SQL
When a query that is supposed to affect rows is executed as part of a transaction, and reports no affected rows, it could mean that: (Choose 2)
transactionsaffected rowsrollbackquery results - Question #160Databases & SQL
Transactions should be used to: (Choose 2)
transactionsatomicitydata integrityerror recovery - Question #161Databases & SQL
An unbuffered database query will: (Choose 2)
unbuffered queriesdatabase performancememory usagequery execution - Question #162Databases & SQL
Which technique should be used to speed up joins without changing their results?
SQL joinsdatabase indicesquery optimizationperformance - Question #163XML & Web Services
Consider the following XML code: ```xml <?xml version="1.0" encoding="utf-8"?> <books> <book id="1">PHP 5.5 in 42 Hours</book> <book id="2">Learning PHP 5.5 The Hard Way</book> </b...
SimpleXMLarray indexingXPathXML navigation - Question #164XML & Web Services
What method can be used to find the tag <any> via the DOM extension?
DOM extensiongetElementsByTagNameDOM methods - Question #165XML & Web Services
What DOMElement method should be used to check for availability of a non-namespaced attribute?
DOMElementhasAttributeXML attributesDOM methods - Question #166XML & Web Services
Which DOMElement property provides a reference to the list of the element's children?
DOMElementchildNodesDOM properties - Question #167XML & Web Services
Which of the following is an invalid DOM save method?
DOMDocumentDOM save methodsXML output - Question #168XML & Web Services
Which of the following rules must every correct XML document adhere to? (Choose 2)
XML well-formedXML validDTDXML standards - Question #169XML & Web Services
Which one of the following XML declarations is NOT valid?
XML declarationXML syntaxstandalone attributeXML version - Question #170XML & Web Services
Which of the following parts must a XML document have in order to be well-formed?
XML well-formedroot elementXML structure - Question #171XML & Web Services
Which of the following can be registered as entry points with a SoapServer instance (choose 2):
SOAPSoapServerweb servicesPHP SOAP extension - Question #172XML & Web Services
Which of the following statements about SOAP is NOT true?
SOAP protocolWSDLHTTP transportweb services - Question #173XML & Web Services
What SimpleXML function is used to parse a file?
SimpleXMLsimplexml_load_fileXML parsing - Question #174XML & Web Services
The XML document below has been parsed into $xml via SimpleXML. How can the value of <foo> tag accessed? ```xml <?xml version='1.0'?> <document> <bar> <foo>Value</foo> </bar> </doc...
SimpleXMLobject property accessXML navigation - Question #175XML & Web Services
What parsing methodology is utilized by the SimpleXML extension?
SimpleXMLDOM parsingXML parsing methods - Question #176XML & Web Services
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml? ```xml <?xml version='1.0'?> <foo> <bar> <baz id...
SimpleXMLattributes()array indexingXML attributes - Question #177XML & Web Services
How can a SimpleXML object be converted to a DOM object?
SimpleXMLDOMdom_import_simplexmlobject conversion - Question #178XML & Web Services
What is the method used to execute XPath queries in the SimpleXML extension?
SimpleXMLXPathxpath method - Question #179XML & Web Services
Which of the following statements are FALSE?
SimpleXMLXML manipulationnode operationsattribute manipulation - Question #180XML & Web Services
What DOM method is used to load HTML files?
DOMDocumentloadHTMLFileHTML parsingDOM methods - Question #181Arrays
What is the output of the following code? ```php for ($i = 0; $i < 1.02; $i += 0.1?) { $a[$i] = $i; } echo count ($a); ```
floating point precisionarray keystype coercioncount() - Question #182Arrays
After performing the following operations: ```php $a = array('a', 'b', 'c'); $a = array_keys (array_flip ($a)); ``` What will be the value of $a?
array_fliparray_keysarray reindexing - Question #183Arrays
PHP's array functions such as array_values() can be used on an object if the object...
ArrayAccessTraversablearray functions on objectsCountable - Question #184Arrays
What is the most efficient way to determine if a key is present in an array, assuming the array has no NULL values?
issetarray_key_existskey lookupperformance - Question #185Arrays
An object can be counted with count() and sizeof() if it...
count()Countable interfacesizeofobject counting - Question #186Arrays
Which value will be assigned to the key 0 in this example? $foo = array(true, '0' => false, false => true);
array key coercionboolean keysstring-to-int keysduplicate keys - Question #187Arrays
What will be the result of the following operation? ```php array_combine(array("A", "B", "C"), array(1,2,3)); ```
array_combinekey-value mappingarray creation - Question #188Arrays
Which of the following expressions will evaluate to a random value from an array below? `$array = array("Sue", "Mary", "John", "Anna");`
array_randrandom accessarray indexingshuffle - Question #189Arrays
What function can reverse the order of values in an array so that keys are preserved?
array_reversekey preservationarray ordering - Question #190Arrays
What will be the output value of the following code? ```php $array = array(1,2,3); while (!list($v) = each ($array)) var_dump (current ($array)); ```
list()each()array traversalcurrent() - Question #191Arrays
What will be the output of the following code? ```php $a = array(0, 1, 2 => array(3, 4)); $a[] = array(4, 5); echo count ($a, 1); ```
count()COUNT_RECURSIVEnested arraysmultidimensional arrays - Question #192Object-Oriented Programming
The constructs for(), foreach(), and each() can all be used to iterate an object if the object...
ArrayAccessobject iterationforeachIterator interface - Question #193Strings & Patterns
Which parts of the text are matched in the following regular expression? $text = <<<EOT The big bang bonged under the bung. EOT; preg_match_all('/(@b.n?g@', $text, $matches);
preg_match_allregex quantifierscharacter patternsword boundary - Question #194Strings & Patterns
What will the following code piece print? echo strtr('Apples and bananas', 'ae', 'ea');
strtrcharacter translationstring manipulation - Question #195Web Features
You want to parse a URL into its single parts. Which function do you choose?
parse_urlURL parsingURL components - Question #196I/O
Which elements does the array returned by the function pathinfo() contain?
pathinfofile path parsingdirnamebasename - Question #197Strings & Patterns
What will the following function call print? printf('%010.6f', 22);
printfformat specifierszero-paddingfloat formatting - Question #198Data Formats & Types
What is the output of the following code? echo '0x33, ' monkeys sit on ', 011, ' trees.';
hexadecimal literalsoctal literalsstring concatenationnumeric type casting - Question #199Strings & Patterns
You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilities work? (Choose 2)
string character accesscurly brace syntaxsquare bracket indexing - Question #200Strings & Patterns
Which sentence describes the following regular expression match? preg_match('/^(\^d{1,}(\.[0-9])++?(\?:\^d+?([0-9-]))+/', $test, $matches);
complex regexfloat matchingnon-greedy quantifierspattern analysis