DEV Community

Discussion on: PHP REPL - Interactive Editing Tool For Learning PHP (Hot Reload)

Collapse
 
moopet profile image
Ben Sinclair

There's always php -a which gives you a REPL (though it's not particularly brilliant).

Is this running the entire file from scratch each time? If so, then it's not doing the same as a REPL, and values will change depending on other circumstances, like responses from APIs or REQUEST_TIME, etc.
You need to be careful about hosting this anywhere other than your local development box in case it turns out to be easily exploitable.

I'm curious as to why you'd decide to write a PHP app... in Python?

Collapse
 
datmt profile image
Mạnh Đạt

Thanks for your comment.

Well, maybe it is not a repl literally. What I wanted was something that evaluates the code I write instantly without executing co/reload the browser manually.

This project is for learning purposes only. It came from my own need actually. I need to strengthen my PHP knowledge so I write a lot of short snippets.

As per writing php app in python, well, it does what I need quickly (based on my current knowledge) so why not :)