+ 19

Error code in php

There is the error in this question I don't understand why there is error because this code is given by sololearn itself. Then too the question is giving error. Please let me know why there is an error and what should be done so that the code runs. https://code.sololearn.com/wJKkqldJjDeL/?ref=app

29th Jun 2020, 4:42 PM
Piyush
Piyush - avatar
10 Respuestas
+ 6
piyush singh <?php define("MSG", " Hi SoloLearners!");?> <?=MSG;?>
29th Jun 2020, 9:49 PM
BroFar
BroFar - avatar
+ 5
The problem has to do with the case. You used msg instead of MSG, which was defined. change msg to MSG and you'll be good to go.
29th Jun 2020, 4:52 PM
Mwikisa Kapesa Lufungulo
Mwikisa Kapesa Lufungulo - avatar
+ 4
piyush singh I think it might be because the case insensitive declarations weren't deprecated the time Sololearn published the lesson. The default of constants is false, so you don't have to provide the true parameter.
29th Jun 2020, 5:21 PM
Mwikisa Kapesa Lufungulo
Mwikisa Kapesa Lufungulo - avatar
+ 3
MDKL⚡⚡☁ it's already MSG ..
29th Jun 2020, 4:55 PM
Piyush
Piyush - avatar
+ 3
BroFar but why the sololearn's code is wrong ? As that was the code given by sololearn.
30th Jun 2020, 2:17 AM
Piyush
Piyush - avatar
+ 3
piyush singh depreciated $case_insensitive boolean not recognizing as boolean is not defined properly.
30th Jun 2020, 2:43 AM
BroFar
BroFar - avatar
+ 2
The error message clearly says what's wrong with your code.
29th Jun 2020, 6:48 PM
Raj Chhatrala
Raj Chhatrala - avatar
+ 2
Defense Hack it's not my code already given by sl
1st Jul 2020, 5:51 AM
Piyush
Piyush - avatar
+ 1
You think To Make msg us to uppercase define("MSG", " Hi SoloLearns!"); and echo MSG Remove true in your code
1st Jul 2020, 5:42 AM
Defense Hack
Defense Hack - avatar
0
There are mistakes and lack of explanation, for humans.
30th Jun 2020, 6:48 AM
T Komai
T Komai - avatar