Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$a = "$winner";
$b = "$looser";
echo $a, $b;
?>

A. $winner$looser

B. $looser

C. \

D. $looser

Answer: Option D

Solution(By Examveda Team)

As there is a backslash before $ it takes it as a string and not a variable therefore we get $looser as the output.

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

Join The Discussion

Related Questions on Operators and Expressions in php