peachpiecompiler / peachpie

PeachPie - the PHP compiler and runtime for .NET and .NET Core
https://www.peachpie.io
Apache License 2.0
2.31k stars 201 forks source link

Dynamicly compile the php script #1139

Closed HengzheLi closed 2 months ago

HengzheLi commented 2 months ago

I am a fresh of this project. Juost wonder is it possible to compile the php script on the fly when debugging the php?

Currently, it has to recompile the host project to apply the change in a php script file. I have to stop then start the VS to see the latest result when I make an update on a php script in debugging. Can it be like the razor view when I save then refrsh the browser, then the updated view is there.

bfistein commented 2 months ago

You can actually use Razor views with PeachPie, see some samples here.

Additionally, you can use eval() to use dynamic scripting as you're used to from PHP, but this is a little frowned upon, to say the least :)

jakubmisek commented 2 months ago

@HengzheLi Hi, Edit&Continue is not implemented yet. So it's necessary to restart your project after making changes.

HengzheLi commented 2 months ago

OK. Thanks for your replies