Examveda
Examveda

What will be the output of the following PHP code ?
<?php
define('IF', 42); 
echo "IF: ", IF;
?>

A. IF:42

B. No output

C. IF:

D. ERROR

Answer: Option D

Solution(By Examveda Team)

Keyword like IF cannot be used as constant names.

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

Join The Discussion

Related Questions on Operators and Expressions in php