PHP Output Prediction Easy +10 XP
String Functions
What does this return?
PHPRead-only
echo strlen("Hello, World!");What is the output?
Show answer and explanation
Answer: 13
strlen() counts the number of characters in a string. 'Hello, World!' has 13 characters including the comma and space.
Hint: Count every character including punctuation and spaces.
What this challenge tests
Output Prediction in PHP: strings, functions.