Examveda

What will be the output of the following PHP code ?
<?php
print_r "Hello world"
?>

A. Error

B. Hello World

C. Nothing

D. Missing semicolon error

Answer: Option A

Solution (By Examveda Team)

The statement should be print_r(‘Hello World’) to print Hello world. Also if there is only one line then there is no requirement of a semicolon, but it is better to use it.

This Question Belongs to PHP >> Operators And Expressions In Php

Join The Discussion

Comments (1)

  1. عبووود الأسطا
    عبووود الأسطا:
    3 years ago

    Answer will be true32

Related Questions on Operators and Expressions in php