Is there anything like CoffeeScript for PHP?

后端 未结 10 1702
忘了有多久
忘了有多久 2020-12-08 04:10

PHP interpreters are very common, but the PHP syntax & libraries are inconsistent & cumbersome (IMO, of course). I think a language that compiles into PHP but provid

相关标签:
10条回答
  • 2020-12-08 04:40

    Take a look at coffescript-php project which is compatible with coffescript 1.3.1 on github can be found at https://github.com/alxlit/coffeescript-php

    0 讨论(0)
  • 2020-12-08 04:41

    Currently there is no production-ready or completed coffeescript-like language/compiler for PHP.

    I am the author of CoffeePHP, and is working on the compiler for the shorter syntax. it's actually another language.

    https://github.com/c9s/coffeephp

    0 讨论(0)
  • 2020-12-08 04:41

    This library isn't like CoffeeScript, in itself, but it's a foundation for rewriting PHP to declare and use your own syntax. I don't have any experience with it, so don't read this as an endorsement, just an observation. https://github.com/theseer/preprocessor

    0 讨论(0)
  • 2020-12-08 04:48

    Browsing and surfing the web I've found http://mammouth.boutglay.com/ looks like the most similar to coffee-script language for PHP. Seems to do the job.

    0 讨论(0)
  • 2020-12-08 04:50

    Of course, you might be aware of this, but you could simply use nodejs with CoffeeScript... (unless you're specifically attached to PHP)

    0 讨论(0)
  • 2020-12-08 04:51

    If I've understood what you want correctly, then there's Haxe, which can target PHP, as well as Flash, JavaScript, and others.

    I've only ever used it for Flash but found it very useful.

    0 讨论(0)
提交回复
热议问题