echo property_exists((object) $a, 'a')?

What is the output of the following code? $a= array('a', 'b'=>'c'); echo property_exists((object) $a, 'a')?'true':'false'; echo'-'; echo property_exists((object) $a, 'b')?'true':'false';A . false-falseB . false-trueC . true-falseD . true-trueView AnswerAnswer: B

May 8, 2018 No Comments READ MORE +

Given the following DateTime objects, what can you use to compare the two dates and indicate that $date2 is the later of the two dates?

Given the following DateTime objects, what can you use to compare the two dates and indicate that $date2 is the later of the two dates? $datel = new DateTime('2014-02-03'); $date2 = new DateTime('2014-03-02');A . $date2 > $datelB . $date2 < $datelC . $datel->diff($date2) < 0D . $datel->diff($date2) > 0View AnswerAnswer:...

May 7, 2018 No Comments READ MORE +

Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)

Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)A . Limit the amount of memory a script can consumeB . Limit the total amount of memory PHP uses on the entire serverC . Limit the maximum execution time of...

May 4, 2018 No Comments READ MORE +

What is the output of the following code?

What is the output of the following code? A . MyNamespaceTestB . empty stringC . parse errorD . TestView AnswerAnswer: B

May 2, 2018 1 Comment READ MORE +

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

What is the difference between "print" and "echo"?A . There is no difference.B . Print has a return value, echo does notC . Echo has a return value, print does notD . Print buffers the output, while echo does not E: None of the aboveView AnswerAnswer: B

May 2, 2018 No Comments READ MORE +

What change must be made to the class for the code to work as written?

Consider the following code. What change must be made to the class for the code to work as written? class Magic { } protected $v = array("a" => 1, "b" => 2, "c" => 3); public function _get($v) { return $th is->v[$v ]; $m = new Magic(); $m->d[] = 4;...

May 1, 2018 1 Comment READ MORE +

What function allows resizing of PH P's file write buffer?

What function allows resizing of PH P's file write buffer?A . ob_start()B . set_write_buffer()C . stream_set_write_buffer()D . Change the output_buffering INI setting via ini_set() functionView AnswerAnswer: C

May 1, 2018 No Comments READ MORE +

Which of the following statements about anonymous functions in PHP are NOT true? (Choose 2)

Which of the following statements about anonymous functions in PHP are NOT true? (Choose 2)A . Anonymous functions can be bound to objectsB . Anonymous functions created within object context are always bound to that objectC . Assigning closure to a property of an object binds it to that objectD...

April 27, 2018 No Comments READ MORE +

Which of the following tasks can be achieved by using magic methods? (Choose 3)

Which of the following tasks can be achieved by using magic methods? (Choose 3)A . Initializing or uninitializing object dataB . Creating a new stream wrapperC . Creating an iterable objectD . Processing access to undefined methods or propertiesE . Overloading operators like+,*, etc.F . Converting objects to string representationView...

April 23, 2018 No Comments READ MORE +

What types of HTTP authentication are supported by PHP? (Choose 2)

What types of HTTP authentication are supported by PHP? (Choose 2)A . BasicB . AdvancedC . StrictD . DigestE . RealmView AnswerAnswer: A, D

April 23, 2018 No Comments READ MORE +