New Year Sale - Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70dumps

200-500 Questions and Answers

Question # 6

Consider the following code:

strspn($test, 'aeiou', 1);

The variable $test contains the string "You get certified".

What will the function call return?

A.

true

B.

false

C.

0

D.

1

E.

2

F.

3

Full Access
Question # 7

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)

Full Access
Question # 8

PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...

A.

implements Traversable

B.

is an instance of ArrayObject

C.

implements ArrayAccess

D.

None of the above

Full Access
Question # 9

Which technique should be used to speed up joins without changing their results?

A.

Add indices on joined columns

B.

Add a WHERE clause

C.

Add a LIMIT clause

D.

Use an inner join

Full Access
Question # 10

What is the output of the following code?

try {

class MyException extends Exception {};

try {

throw new MyException;

}

catch (Exception $e) {

echo "1:";

throw $e;

}c

atch (MyException $e) {

echo "2:";

throw $e;

}}

catch (Exception $e) {

echo get_class($e);

}

A.

A parser error, try cannot be followd by multiple catch

B.

1:

C.

2:

D.

1:Exception

E.

1:MyException

F.

2:MyException

G.

MyException

Full Access
Question # 11

You want to present the following formatted number: "999.000.000,00". Which function call is correct?

A.

print format_number(999000000);

B.

print number_format(999000000);

C.

print number_format(999000000, 2, ',', '.');

D.

print number_format(999000000, 2);

E.

print_number(999000000, 2, ',', '.')

Full Access
Question # 12

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 # 13

Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?

A.

header()

B.

headers()

C.

headers_list()

D.

headers_sent()

Full Access
Question # 14

An unbuffered query will: (Choose 2)

A.

Return the first data faster

B.

Return all data faster

C.

Free connection faster for others scripts to use

D.

Use less memory

Full Access
Question # 15

How many elements does the array $matches from the following code contain?

1 <?php

2 $str = "The cat sat on the roof of their house.";

3

4 $matches = preg_split("/(the)/i", $str, -1,

PREG_SPLIT_DELIM_CAPTURE);

5 ?>

A.

2

B.

3

C.

4

D.

7

E.

9

Full Access
Question # 16

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)

<?php

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

Full Access
Question # 17

Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?

A.

TRUE

B.

FALSE

C.

ENT_QUOTES

D.

ENT_NOQUOTES

E.

ENT_COMPAT

Full Access
Question # 18

What is the return value of the following code: substr_compare("foobar", "bar", 3);

A.

-1

B.

1

C.

TRUE

D.

0

E.

FALSE

Full Access
Question # 19

When comparing prepared statements and regular, application-constructed SQL statements, which of the following is true?

A.

Prepared statements are faster

B.

Prepared statements are always shorter

C.

Prepared statements are more secure

D.

Prepared statements are easier to develop

E.

None of the above

Full Access
Question # 20

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 # 21

Which of the following commands will append data to an existing file?

A.

file_put_contents("file", "data", "a");

B.

file_put_contents("file", "a", "data");

C.

file_put_contents("file", "data", FILE_APPEND);

D.

file_put_contents("file", "a", NULL, FILE_APPEND);

Full Access
Question # 22

What is the output of the following script?

1 <?php

2 class a

3 {

4 public $val;

5 }

6

7 function renderVal (a $a)

8 {

9 if ($a) {

10 echo $a->val;

11 }

12 }

13

14 renderVal (null);

15 ?>

A.

A syntax error in the function declaration line

B.

An error, because null is not an instance of 'a'

C.

Nothing, because a null value is being passed to renderVal()

D.

NULL

Full Access
Question # 23

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

Full Access
Question # 24

Which of the following statements about PHP is true? (Choose 3)

a) A final class can be derived.

b) A final class may be instantiated.

c) A class with a final function may be derived.

d) Static functions can be final.

e) Properties can be final.

A.

a)

B.

b)

C.

c)

D.

d)

E.

e)

Full Access
Question # 25

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 # 26

What is the output of the following code?

$first = "second";

$second = "first";

echo $$$first;

A.

first

B.

second

C.

an empty string

D.

an error

Full Access
Question # 27

Which methods can be used to overload object properties? (Choose 2)

A.

set(), get()

B.

__set(), __get()

C.

__put(), __receive(), __exists()

D.

set(), get(), isset()

E.

__isset(), __unset()

Full Access
Question # 28

What happens if you try to access a property whose name is defined in a parent class as private, and is not declared in the current class?

A.

An E_NOTICE error will be triggered.

B.

An E_ERROR error will be triggered.

C.

An E_WARNING error will be triggered.

D.

No errors will be triggered

Full Access
Question # 29

Which elements does the array returned by the function pathinfo() contain?

A.

root, dir, file

B.

dirname, filename, fileextension

C.

dirname, basename, extensio

D.

path, file

Full Access
Question # 30

You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilities work?(Choose 2)

A.

echo $test(3)

B.

echo $test[2];

C.

echo $test(2);

D.

echo $test{2};

E.

echo $test{3}

Full Access
Question # 31

Which of the following statements about SOAP is NOT true?

A.

SOAP is a request-/response-based protocol.

B.

SOAP can be transported using SMTP, HTTP and other protocols.

C.

SOAP requires developers to use WSDL.

D.

SOAP traffic via HTTP can be encrypted and compressed just like other HTTP requests.

Full Access
Question # 32

Which 2.17of the following formats is used to describe web services?

A.

WSDL

B.

UDDI

C.

SOAP

D.

XLANG

Full Access