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

Which of the listed changes would you make to the following PHP 4 code in order to make it most compliant with PHP 5? (Choose 2)

class Car {

var $model;

function Car($model) {

$this->model = $model;

} function toString() {

return "I drive a $this->model.";

}}

$c = new Car('Dodge');

echo $c->toString();

?>

A.

Change var to public or private

B.

Change function Car to function_construct

C.

Change "I drive a $this->model." to "I drive a {$this->model}."

D.

Change function toString()to static function toString()

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.

What is the output of the following code?

A.

0

B.

An integer overflow error

C.

A warning, because $x1 is not set

D.

A warning, because $x2 is not set

E.

A floating-point overflow error

F.

Nothing

What SimpleXML function is used to parse a file?

A.

simplexml_load_file()

B.

simplexml_load_string()

C.

load()

D.

loadFile()

E.

loadXML()

F.

None of the above.

What function should be used to escape command line arguments that are passed to commands executed from PHP?

A.

addslashes()

B.

quotemeta()

C.

escapeshellarg()

D.

escapeshellcmd()

E.

passthru()

What PHP function can be used to remove a local file?

A.

A) rmdir()

B.

B) unlink()

C.

C) rm()

D.

D) delete()

E.

E) delete_file()

Which of the following statements are correct? (Choose 2)

A.

It is possible to specify more than one __autoload function

B.

__autoload receives the missing class name all lowercased

C.

__autoload is being called for missing interfaces

D.

Inside __autoload missing classes trigger __autoload

What is the difference between "print" and "echo"?

A.

There is no difference.

B.

Print returns length of data printed and echo does not

C.

Echo returns length of the data printed and print does not

D.

Print buffers the output, while echo does not

E.

None of the above

What DOM method is used to load HTML files?

A.

load()

B.

loadXML()

C.

loadHTML()

D.

loadHTMLFile()

Can calls to Web Services be queued natively in PHP?

A.

Yes

B.

No

C.

Only if PHP is compiled with --enable-soap-queue