<<< Previous question <<< Question ID#0582.md >>> Next question >>>
What will be the output of the below code?
$a = "PHP";
$a++;
echo $a;
- A) PHQ
- B) PHP
- C) 0
- D) 1
Answer
Answer: A
Explanation – All variables are stored using their ASCII value, so when we increment any variable the ASCII value is incremented. If we do $a++
again we will get the output as PHR
.