Examveda

What will be the output of the following PHP code ?
<?php
define("__LINE__", "PHP is a scripting language");
echo __LINE__;
?>

A. PHP is a scripting language

B. __LINE__

C. 2

D. ERROR

Answer: Option C

Solution (By Examveda Team)

__LINE__ is a magical constant that gives the current line number and cannot be used a variable/constant name.

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

Join The Discussion

Related Questions on Operators and Expressions in php