Ask coding questions

← Back to all posts
2
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?

Commentshotnewtop
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!

1
themaka (176)

Hello again @CogantProductio !

One of our engineers built a quick PHP server using our experimental polygott option:
https://repl.it/@turbio/php-server

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:
https://repl.it/feedback/p/php

1
teachermaka (0)

Repl.it 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.

1
mat1 (2242)

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

1
TheDrone7 (510)

@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.

1
Vandesm14 (483)

@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).

1
TheDrone7 (510)

@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.