Skip to content
← Back to Community
Solved: PHP on repl
Profile icon
ArchieMaclean

Hi there,
I am learning PHP, and literally started this afternoon. In the tutorial I was watching it said you could put HTML tags in the PHP file, but this doesn't seem to work...
Is this a problem with my code or does repl not support it?
I get error syntax error, unexpected '<', expecting end of file
The repl is here: https://repl.it/@ArchieMaclean/PHPtest
Thank you!

Solved: Repl doesn't support it

Answered by theangryepicbanana [earned 5 cycles]
View Answer
Voters
Profile icon
Momostar2009
Profile icon
novinc
Profile icon
ArchieMaclean
Comments
hotnewtop
Profile icon
theangryepicbanana

you don't need to include any html. just start with <?php and it should work

Profile icon
ArchieMaclean

@theangryepicbanana ok thank you

Profile icon
TSelden

Did you include the closing php tag: '?>'? That could be your problem.

Profile icon
timmy_i_chen

We made some updates to PHP (well, we made two new "languages"):

https://repl.it/languages/php_cli - New and improved PHP language for command line interface shenanigans. Supports multiple files and syntax highlighting.
https://repl.it/languages/php7 - PHP Web servers! Just like other hosted repls, this allows you to write websites using PHP.

Enjoy!

Profile icon
ArchieMaclean

@timmy_i_chen 👏 Yay :)