Ask coding questions

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

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 (652) [earned 5 cycles]
View Answer
Commentshotnewtop
2
theangryepicbanana (652)

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

1
timmy_i_chen (934)

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!