Examveda
Examveda

What will be the output of the following PHP code?
<?php
    echo ord ("hi");
?>

A. 106

B. 103

C. 104

D. 209

Answer: Option C

Solution(By Examveda Team)

The ord() function returns the ASCII value of the first character of a string. The ASCII value of h is 104, thus 104 was displayed.

This Question Belongs to PHP >> Functions

Join The Discussion

Related Questions on Functions