Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

What visibility denies access to properties and methods outside of the class?

A.

static

B.

protected

C.

private

D.

public

E.

const

Assume that you are using PHP s session management without cookies and want to make sure that session information does not get lost when redirecting the client to another URL. Which of the following functions do you need to achieve that? (Choose 3)

A.

header()

B.

session_id()

C.

session_info()

D.

session_name()

E.

session_write_close()

What will the following code piece print?

echo strtr('Apples and bananas', 'ae', 'ea')

A.

Applas end benenes

B.

Epplas end benenes

C.

Apples and bananas

D.

Applas end bananas

What is the output of the following code?

1

2 $a = 'a'; $b = 'b';

3 echo isset($c) ? $a.$b.$c : ($c = 'c').'d';

4 ?>

A.

abc

B.

cd

C.

0d

How can precisely one byte be read from a file, pointed by $fp? (Choose 2)

A.

fread($fp, 1);

B.

fgets($fp, 1);

C.

fgetss($fp, 1);

D.

fgetc($fp);

E.

All of the above

What method can be used to find a tag with the name "foo" via the DOM extension?

A.

getElementById()

B.

getElementsByTagName()

C.

getElementsByTagNameNS()

D.

getElementByName()

E.

findTag()

You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?

A.

Adapter

B.

Factory

C.

MVC

D.

Singleton

Which is the most efficient way to determine if a key is present in an array,assuming the array has no NULL values?

A.

in_array('key', array_keys($a))

B.

isset($a['key'])

C.

array_key_exists('key', $a)

D.

None of the above

How can you redirect a client to another page using PHP?

A.

header('Location: /another_page.php');

B.

header('Content-Location: /another_page.php');

C.

header('Redirect: /another_page.php');

D.

header('Redirect: /another_page.php', 1, 302);

E.

header('HTTP/1.1 302 /another_page.php');

The following form is loaded in a recent browser and submitted, with the second list element selected:

In the server-side PHP code to deal with the form data, what is the value of $_POST['list']?

A.

1

B.

2

C.

two

D.

null (since the value attribute of the list has not been set)