Labour Day Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Question # 4

Which of the following may be used in conjunction with CASE inside a SWITCH statement?

A.

A scalar

B.

An expression

C.

A boolean

D.

All of the above

Full Access
Question # 5

What do bytecode caches do?

A.

Cache the output of PHP scripts for reuse

B.

Translate PHP bytecode into machine code and cache the results

C.

Save the results of the compilation of PHP scripts for reuse

D.

Save large data structures (e.g. database result sets) in memory for reuse

Full Access
Question # 6

Which of the following data types cannot be directly manipulated by the client?

A.

Cookie Data

B.

Session Data

C.

Remote IP Address

D.

User Agent

Full Access
Question # 7

PHP’s array functions such as array_values() can be used on an object is the oject….

A.

implement Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Full Access
Question # 8

Which of the following is an invalid DOM save method?

A.

save()

B.

saveFile()

C.

saveXML()

D.

saveHTML()

E.

saveHTMLFile()

Full Access
Question # 9

Which SPL class implements fixed-size storage?

Full Access
Question # 10

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

Full Access
Question # 11

What is the output of the following code?

A.

An error

B.

1,1,1,1,1,1,1,1,1,1,

C.

1,1,2,3,5,8,13,21,34,55,

D.

Nothing

Full Access
Question # 12

Which of the following encryption standards provides symmetric key encryption? (Choose 2)

A.

AES

B.

Blowfish

C.

DES

D.

RSA

Full Access
Question # 13

Some databases support the LIMIT clause. It is a method to ensure that ...

A.

only certain rows are deleted in DELETE queries.

B.

only a defined subset of rows are read in SELECT queries.

C.

only certain users can access the database.

Full Access
Question # 14

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

Full Access
Question # 15

What is the length of a string returned by: md5(rand(), TRUE);

A.

Depends on the value returned by rand() function

B.

32

C.

24

D.

16

E.

64

Full Access
Question # 16

What is the output of the following code?

class test {

public $value = 0;

function test() {

$this->value = 1;

} function __construct() {

$this->value = 2;

}}

$object = new test();

echo $object->value;

A.

2

B.

1

C.

0

D.

3

E.

No Output, PHP will generate an error message.

Full Access
Question # 17

Which of the following keywords is not new in PHP 5?

A.

implements

B.

instanceof

C.

static

D.

abstract

Full Access
Question # 18

What type of class definition can be used to define multiple inheritance?

A.

Class

B.

Abstract

C.

Interface

D.

Final

Full Access
Question # 19

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()

Full Access
Question # 20

Consider the following code. What can be said about the call to file_get_contents?

A.

A GET request will be performed on http://example.com/submit.php

B.

A POST request will be performed on http://example com/submit.php

C.

An error will be displayed

Full Access
Question # 21

What function can be used to retrieve an array of current options for a stream context?

A.

stream_context_get_params

B.

stream_context_get_default

C.

stream_context_get_options

D.

The 'options' element of the stream_get_rneta_data return value

Full Access
Question # 22

Which of the following statements is correct?

A.

Interfaces can extend only one interface

B.

Interfaces can extend more than one interface

C.

Interfaces can inherit a method from different interfaces

D.

Interfaces can redeclare inherited methods

Full Access
Question # 23

What is "instanceof" an example of:

A.

a boolean

B.

an operator

C.

a function

D.

a language construct

E.

a class magic

Full Access
Question # 24

Which of the following statements is true?

A.

All PHP database extensions support prepared statements

B.

All PHP database extensions come with their own special helper functions to escape user data to be used in dynamic SQL queries

C.

All PHP database extensions provide an OOP interface

D.

All PHP database extensions appear in the output of php -m , if installed

Full Access
Question # 25

Which of the following statements are NOT true?

A.

SimpleXML allows removal of attributes.

B.

SimpleXML allows addition of new attributes.

C.

SimpleXML allows removal of nodes.

D.

SimpleXML allows addition of new nodes.

E.

None of the above

Full Access
Question # 26

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 ?>

A.

2, 3, 4

B.

2, 3, 6

C.

4, 5, 6

D.

1, 2, 3

Full Access
Question # 27

How many elements does the $matches array contain after the following function call is performed?

preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March

2006', $matches);

A.

1

B.

2

C.

3

D.

4

Full Access
Question # 28

How can the line on which HTTP headers were sent inside a script be determined?

A.

Using the headers_sent() function.

B.

Using the output_start() function.

C.

Using the ob_start() function.

D.

Cannot be determined

Full Access
Question # 29

Given the following array:

$a = array(28, 15, 77, 43);

Which function will remove the value 28 from $a?

A.

array_shift()

B.

array_pop()

C.

array_pull()

D.

array_unshift()

Full Access
Question # 30

Which of the following are valid SoapClient calls? (Choose 2)

A.

$client = new SoapClient("weather.wsdl");

B.

$client = new SoapClient;

C.

$client = new SoapClient(null, array("location" =>

"http://example.com/weather ", "uri" => "http://test-uri.com/ "));

D.

$client = new SoapClient(null, array());

Full Access
Question # 31

When a browser requests an image identified by an img tag, it never sends a Cookie header.

A.

TRUE

B.

FALSE

Full Access
Question # 32

Type hinting in PHP allows the identification of the following variable types: (Choose 2)

A.

String

B.

Integer

C.

Array

D.

Any class or interface type

Full Access
Question # 33

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)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 34

In the function setcookie() what does the 3rd parameter specify?

A.

The name of the cookie.

B.

The expiration time of the cookie.

C.

The value of the cookie.

D.

The IP address of the cookie's client.

Full Access
Question # 35

When working with the MVC paradigma, the business logic should be implemented in which of the following components?

A.

Model

B.

View

C.

Controller

Full Access
Question # 36

Which parts of the text are matched in the following regular expression?

A.

bang bong bung

B.

bang bonged bung

C.

big bang bong bung

D.

big bang bung

Full Access
Question # 37

What is the return value of the following code?

strpos("me myself and I", "m", 2)

A.

2

B.

3

C.

4

D.

0

E.

1

Full Access
Question # 38

What is the output of the following script?

1

2 class a

3 {

4 public $val = 10;

5 }

6

7 function renderVal (a $a)

8 {

9 return $a->$val;

10 }

11

12 renderVal (new a);

13 ?>

A.

Nothing

B.

NULL

C.

A fatal error

D.

$val

E.

10

Full Access