Ask coding questions

← Back to all posts
Solved: PHP on repl
ArchieMaclean (928)

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:
Thank you!

Solved: Repl doesn't support it

Answered by theangryepicbanana (1697) [earned 5 cycles]
View Answer
theangryepicbanana (1697)

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

TSelden (15)

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

timmy_i_chen (1180)

We made some updates to PHP (well, we made two new "languages"): - New and improved PHP language for command line interface shenanigans. Supports multiple files and syntax highlighting. - PHP Web servers! Just like other hosted repls, this allows you to write websites using PHP.