Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Zend 200-500 - Zend PHP 5 Certification

Page: 5 / 7
Total 219 questions

What function is ideal for outputting contents of a static file to screen?

A.

file_get_contents()

B.

readfile()

C.

fread()

D.

include()

E.

require()

F.

file()

Is the following code piece E_STRICT compliant?

final class Testing {

private $test;

public function tester() {

return "Tested!";

}}

A.

Yes

B.

No

How can XML parsing errors be suppressed in the SimpleXML extension?

A.

error_reporting(E_ALL^E_NOTICE);

B.

simplexml_disable_errors(TRUE);

C.

simplexml_ignore_errors(TRUE);

D.

libxml_use_internal_errors(TRUE);

E.

simplexml_load_file("file.xml", LIBXML_NOERROR);

What is the file locking mode that should be used when writing to a file?

A.

LOCK_UN

B.

LOCK_SH

C.

LOCK_EX

D.

LOCK_NB

Consider the following XML code:

PHP 5 Power Programming

Learning PHP 5

Which of the following SimpleXML calls print the name of the second book?

(Let $xml=simplexml_load_file("books.xml");) (Choose 2)

A.

echo $xml->books->book[2];

B.

echo $xml->books->book[1];

C.

echo $xml->book[1];

D.

echo $xml->xpath("/books/book[@id=2]");

E.

$c = $xml->children(); echo $c[1];

What can prevent PHP from being able to open a file on the hard drive (Choose 3)?

A.

File system permissions

B.

File is outside of open_basedir

C.

File is owned by another user and safe_mode is enabled.

D.

File is inside the /tmp directory.

E.

PHP is running as the web server user.

How can the constant defined below be accessed from within PHP?

class myClass {

const FOO = 'BAR';

}

A.

myClass::$FOO

B.

myClass::$$FOO

C.

myClass::FOO

D.

myClass::foo

E.

$foo::myClass

In a typical web application the most used database action is...

A.

INSERT

B.

UPDATE

C.

SELECT

D.

CREATE

E.

ALTER

What XML component does the following XPath query try to match?

//foo[bar/@id=5]

A.

bar element with an id attribute whose value is equal to 5

B.

foo element containing a child node bar tag

C.

id attribute whose value is equal to 5

D.

foo element with a child note bar whose id attribute is equal to 5

E.

all of the foo elements that have a child node bar, whose id attribute is equal to 5

Which of the following function signatures is correct if you want to have classes automatically loaded?

A.

function autoload($class_name)

B.

function __autoload($class_name, $file)

C.

function __autoload($class_name)

D.

function _autoload($class_name)

E.

function autoload($class_name, $file)