|
|
|
|
|
by kevincox
1621 days ago
|
|
If I understand this is a fairly straightforward source-to-source PHP-to-Javascript compiler. It is so simple that when complied to Javascript it uses Javascript semantics! If a PHP look is all that matters I guess it is useful, however the semantic difference between the two languages would be both a pain to work with an a footgun. You are essentially writing two languages at once and you will need lots of diligent testing to ensure that the two behave the same if you ever want to run the same code on the client and server. From my pessimistic viewpoint it looks like using the same code on client and server is not going to work with this approach. If I was writing this I would have tried to make a much more faithful implementation of PHP. Obviously you can't directly connect to your database from the browser but I would try to make the code behave identically (within the supported features). This would likely result in slower code on the client but at least it would be predictable. |
|