Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$var1 = 3;
print $var = ++$var;
?>

A. 1

B. 0

C. 2

D. 3

Answer: Option A

Solution(By Examveda Team)

$var = ++$var returns 1(success).

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

Join The Discussion

Related Questions on Operators and Expressions in php