200-710 Exam QuestionsBrowse all questions from this exam

200-710 Exam - Question 19


Assuming UTF-8 encoding, what is the value of $count?

Show Answer
Correct Answer: A,B

The given code initializes the variable $data with the string '$1a2' and then uses the strlen() function to compute the length of this string. The strlen() function in PHP returns the number of bytes in a string. The string '$1a2' consists of 4 characters: $, 1, a, and 2. Therefore, the value of $count is 4.

Discussion

4 comments
Sign in to comment
ZhukovPeterOption: A
Jan 4, 2020

Confirm, answer is A (4). You can play this program in any PHP online playgrounds. Program: $data = "$1a2"; $count = strlen($data); echo $count; outout: 4

bareaOption: A
Dec 4, 2019

The correct answer is 4

[Removed]Option: A
Jun 20, 2020

The correct answer is A: 4

Andres_Espinosa1Option: A
Apr 30, 2021

se realiza el ejercicio y la respuesta correcta es 4