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

200-530 Questions and Answers

Question # 6

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

What DOM method is used to load HTML files?

A.

load()

B.

loadXML()

C.

loadHTML()

D.

loadHTMLFile()

Full Access
Question # 8

Given a php.ini setting of:

default_charset = utf-8

What will the following code print in the browser?

A.

Garbled data

B.

& # 9986 ; & # 10004 ; & # 10013 ;

C.

A blank line due to charset mismatch

Full Access
Question # 9

What function returns the filename component of the file's path:

A.

dirname()

realpath()

B.

basename()

C.

pathinfo()

D.

parse_url()

Full Access
Question # 10

Can calls to Web Services be queued natively in PHP?

A.

Yes

B.

No

C.

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

Full Access
Question # 11

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

What is the output of the following code?

Full Access
Question # 13

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

Which of the following rules must every correct XML document adhere to? (Choose 2)

A.

It has to be well-formed.

B.

It has to be valid.

C.

It has to be associated to a DTD.

D.

It may only contain UTF-8 encoded characters.

Full Access
Question # 15

What is the purpose of the open_basedir directive?

A.

Provide a list of directories where PHP should search for files.

B.

Provide a list of directories from which PHP can open files.

C.

Provide a list of directories from which PHP cannot open files.

D.

Directory where the PHP extensions can be found.

Full Access
Question # 16

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

A.

TRUE

B.

FALSE

Full Access
Question # 17

What will the following code print?

echo addslashes('I am a small "HTML" string, which is

\'invalid\'.');

A.

I am a small "HTML" string, which is 'invalid'.

B.

I am a small \"HTML\" string, which is \'invalid\'.

C.

I am a small \"HTML\" string, which is \\'invalid\\'.

D.

I am a small \"HTML\" string, which is \\\'invalid\\\'.

E.

I am a \small\<\/b\> "HTML" string, which is 'invalid'\<\/u\>.

Full Access
Question # 18

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

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

A.

INSERT

B.

UPDATE

C.

SELECT

D.

CREATE

E.

ALTER

Full Access
Question # 20

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

A.

TRUE

B.

FALSE

C.

ENT_QUOTES

D.

ENT_NOQUOTES

E.

ENT_COMPAT

Full Access
Question # 21

Given the following two functions, what statement is correct?

function dynamicNew($name) {

return new $name;

}

function reflectionNew($name) {

$r = new ReflectionClass($name);

return $r->newInstanceArgs();

}

A.

Both functions do the same

B.

dynamicNew() results in a parse error, reflectionNew() works

Full Access
Question # 22

What is the result of the following code?

A.

Parse error

B.

3.14

C.

PI

D.

T::PI

Full Access
Question # 23

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

When PHP is running on a command line, what super-global will contain the command line arguments specified?

A.

$_SERVER

B.

$_ENV

C.

$GLOBALS

D.

$_POST

E.

$_ARGV

Full Access
Question # 25

How many elements does the array $pieces contain after the following piece of code has been executed?

$pieces = explode("/", "///");

A.

0

B.

3

C.

4

D.

5

Full Access
Question # 26

When a transaction reports no affected rows, it means that: (Choose 2)

A.

The transaction failed

B.

The transaction affected no lines

C.

The transaction was rolled back

D.

The transaction was committed without error

Full Access
Question # 27

Consider the following table data and PHP code. What is the outcome?

Table data (table name "users" with primary key "Id"):

PHP code (assume the PDO connection is correctly established):

A.

The database will return no rows

B.

The value of $result will be an array

C.

The value of $result will be empty

D.

The value of $result will be 'gamma@exmple.net'.

Full Access
Question # 28

What parsing methodology is utilized by the SimpleXML extension?

A.

SAX

B.

DOM

C.

XPath

D.

Push/Pull Approach

E.

Expat

Full Access
Question # 29

What does an object based on the Active Record pattern provide?

A.

A way to actively control the application's workflow

B.

A way to record the history of its changes

C.

A way to effortlessly store its properties in a database

Full Access
Question # 30

Which of the following is correct? (Choose 2)

1) A class can extend more than one class.

2) A class can implement more than one class.

3) A class can extend more than one interface.

4) A class can implement more than one interface.

5) An interface can extend more than one interface.

6) An interface can implement more than one interface.

A.

1)

B.

2)

C.

3)

D.

4)

E.

5)

F.

6)

Full Access
Question # 31

Which DOMElement property provides a reference to the list of Element's children?

Full Access
Question # 32

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

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

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

A script residing at http://example.com/phpcert/cookies.php contains the following code:

1 <?php

2 setcookie('name1', 'value1', time() + 60*60*24, '/');

3 setcookie('name1', 'value2');

4 ?>

The web browser is configured to accept all cookies. How many cookies will be set by this script?

A.

0

B.

1

C.

2

D.

3

Full Access
Question # 36

Which requirements need NOT be met so that file uploads work?

A.

The PHP directive file_uploads must be set to on

B.

The form's method attribute must be set to "post"

C.

Sate mode must be turned off so that the uploaded file an be written to the server

D.

The form's enctype attribute must be set to "multipart/form-data"

Full Access
Question # 37

You want to extract the pieces of a date string, which looks like this: "2005-11-02". Which of the following pieces of code will property assign $year, $month and $day with their respective values?

A.

sscanf("2005-11-02", '%d-%d-%d', $year, $month, $day);

B.

scan("2005-11-02", '%d-%d-%d', $year, $month, $day);

C.

sscanf('%d-%d-%d', "2005-11-02", $year, $month, $day);

D.

sscan($year, $month, $date '%d-%d-%d', "2005-11-02");

Full Access
Question # 38

Identify the security vulnerability in the following example:

1 <?php

2 echo "Welcome, {$_POST['name']}.";

3 ?>

A.

SQL Injection

B.

Cross-Site Scripting

C.

Remote Code Injection

D.

None of the above

Full Access