+ 3
Wrong Question in a challenge
I tried it in codesplay and it gives error why https://www.sololearn.com/post/400539/?ref=app https://code.sololearn.com/wkMjROCaFOKS/?ref=app
3 Respuestas
+ 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
+ 1
Anyway you can still report the question to SoloLearn, as only they can fix challenges.
+ 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.