Wrong Question in a challenge | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
14th May 2020, 1:36 AM
Abhay
Abhay - avatar
3 Answers
+ 3
I think it was valid code in old php versions, but throws an error because $this is a reserved keyword variable and cannot be overridden. See also https://stackoverflow.com/questions/2699587/php-fatal-error-cannot-re-assign-this
14th May 2020, 1:54 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Anyway you can still report the question to SoloLearn, as only they can fix challenges.
14th May 2020, 1:55 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Abhay No it's not wrong. It's a valid code but this is reserved keywords that's why showing error. Just change this to this1 and see. You will get right answer. $name = "this1" $name $this1 //$name = this1 that I think when quiz was submitted PHP version was different or quiz was submitted and approved without running on terminal.
14th May 2020, 5:41 AM
A͢J
A͢J - avatar