+ 1
What will be the output & how?
<? Php $var="I love php"; echo ++$var; ?>
4 Antworten
+ 3
error,
$ and var do not contain spaces 😁
if it's syntax error free, then output is already guven by Deepak
+ 1
that was by mistake dude...take it easy sachin
0
Output is "I love phq". It seems that ++ operator increment the last character in the string.
I have tested with few letters, output was like this ----
'a' => 'b'
'b' => 'c',
'k' => 'l'
'z' => 'aa'
I am confused about the output for 'z'. Hope some expert will answer your question ( hopefully i will learn also :) )
0
I didn't think he placed the spaces intentionally, so I removed those spaces and tested 😴