What is the output of `strlen("Hello")` in PHP?

Prepare for the Zend Certified PHP Engineer Exam with our comprehensive test, featuring flashcards and multiple choice questions. Each question comes with detailed hints and explanations. Ensure you're ready for your exam!

The function strlen() in PHP returns the length of a given string in bytes. When you call strlen("Hello"), it computes the number of characters in the string "Hello".

In this case, "Hello" consists of five letters: H, e, l, l, and o. Therefore, the output of strlen("Hello") is 5, which represents the total number of characters present in the string.

It's important to note that this function counts each character individually and does not include any hidden characters or special formatting unless they are part of the string itself. Thus, option A is the correct answer.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy