Exam 200-710 All QuestionsBrowse all questions from this exam
Question 13

What is the output of the following code?

    Correct Answer: A

    The reason is that the substr function in PHP when given a start position that is greater than the length of the string will return an empty string. In this case, since the string 'Good luck!' has a length of 10 and the starting position provided is also 10, there are no characters to return from that position onward, resulting in an empty string output, which is displayed as string(0) "" by var_dump.

Discussion
ZhukovPeterOption: A

I think answer should be A. You can play this program on any PHP online playgrounds. Prorgram: $string = 'Good luck!'; $start = 10; var_dump(substr($string, $start)); output: string(0) ""

[Removed]Option: A

the Answer should be A.

thuanptOption: A

The answer is A,

AndrewPetaPetaOption: A

The answer is A, without a doubt, please correct this.

nicky91294Option: A

Answer is A

Andres_Espinosa1Option: C

acabo de correr la linea de codigo y la respuesta es C sin duda