Problem with PHP compiler | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Problem with PHP compiler

Hello. I try compiler this code, but he result error. I tried other way to writing a code but result was a same. I am sure this code is correct. What i do wrong? <?php echo date("M-d-Y", mktime(0, 0, 0, 12, 32, 1997)); echo date("M-d-Y", mktime(0, 0, 0, 13, 1, 1997)); echo date("M-d-Y", mktime(0, 0, 0, 1, 1, 1998)); echo date("M-d-Y", mktime(0, 0, 0, 1, 1, 98)); ?> Fatal error: Uncaught Error: Call to undefined function echo date() in ..\Playground\:2 Stack trace: #0 {main} thrown in ..\Playground\ PHP Fatal error: Uncaught Error: Call to undefined function echo┬ádate() in ..\Playground\:2 Stack trace: #0 {main} thrown in ..\Playground\

12th Sep 2018, 10:31 AM
Петро Петро
Петро Петро - avatar
3 Answers
+ 4
Your whitespace are not spaces. Replace the invisible character with an actual space and it works.
12th Sep 2018, 1:58 PM
John Wells
John Wells - avatar
+ 3
They sometimes appear copying and pasting from certain web sites and IDEs. Accessing SoloLearn via Firefox browser shows them as red boxes with a centered dot.
12th Sep 2018, 4:55 PM
John Wells
John Wells - avatar
+ 1
Thank you for the answer. I really do not understand how these characters appear, but thanks anyway.
12th Sep 2018, 4:09 PM
Петро Петро
Петро Петро - avatar