Ask coding questions

← Back to all posts
Does repl support php in html?
CogantProductio (1)

I know repl supports php in general but from what I can tell repl doesn't seem to support the use of php in their "web project" language. I've tried inside html via <?php?> and just making a separate file. Does repl support php in html and if not why?

timmy_i_chen (1023)

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.


themaka (181)

Hello again @CogantProductio !

One of our engineers built a quick PHP server using our experimental polygott option:

You can fork this and work with it. It is still effectively a beta, so I wouldn't build it into something that you need to have up 100% of the time.

Let us know if you run into any issues.

Also go vote here:

teachermaka (0) does not, currently, support php in html. We'd like to add it (and not just to html), but we always have to decide what to prioritize. At this time, I can only tell you that it is on our radar, but we don't have an ETA for when it will be added.

mat1 (2877)

No. PHP is an old language that shouldn't be used anywhere.

TheDrone7 (664)

@mat1 that is 100% true but if people still want to use it they can simply create a PHP repl. @CogantProductio Create a PHP repl.

Vandesm14 (1665)

@TheDrone7 But HTML Repls do not support PHP. PHP repls (alone) are pretty much useless without HTML, so going with Expressjs would be a better option (that actually works).

TheDrone7 (664)

@Vandesm14 I think I did say, that if people want to use it or like they don't have another choice. I fully support your suggestions.