Knowee
Questions
Features
Study Tools

What will be the output of the following code?<?phpecho ord ("Hello World");?>

Question

What will be the output of the following code?<?phpecho ord ("Hello World");?>

🧐 Not the exact question you are looking for?Go ask a question

Solution

The output of the given PHP code will be 72.

Here's the step by step explanation:

  1. The ord() function in PHP returns the ASCII value of the first character of a string.

  2. In the given code, the string is "Hello World". The first character of this string is 'H'.

  3. The ASCII value of 'H' is 72.

So, the output will be 72.

Similar Questions

What will be the output of the following PHP code?< ?php$hello = "Hello World";$bye = "Bye";echo $hello;"$bye";?>

What will be the output of the following PHP code?

What will be the output of the following PHP code?<?phpdefine("GREETING", "PHP is a scripting language");echo $GREETING;?>Group of answer choicesno output$GREETINGGREETINGPHP is a scripting language

What will be displayed by this code?<?php      FUNCTION TEST()     {              ECHO "HELLO WORLD!\n";   }     test(); ?>Question 16Select one:a.Nothingb.test()c.Blinking textd.HELLO WORLD!

What will be the output of the following PHP code?< ?phpecho $red ;?>0NothingTrueError

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.