1

Are there stable well tested SDKs (as opposed to simple language converters) that allow you to develop your application in some decent language (I believe it is widely accepted that PHP is not a well designed platform) and then give PHP code as an output, so you can host your application on a server that only accepts PHP as a server-side scripting language?

closed as off-topic by gnat, World Engineer Sep 20 '14 at 17:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, World Engineer
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Even if not, there are ways within PHP to run programs from other languages and capture the output. Work arounds could be performed. – Travis Weston Sep 20 '14 at 13:25
  • Are you looking for some translator from a well designed language to PHP (as a target language)? BTW, there are other ways to develop web app opa, etc... – Basile Starynkevitch Sep 20 '14 at 13:33
  • >> I believe it is widely accepted that PHP is not a well designed platform - Not true. It's not 'widely accepted' just because you found an article from an author with, apparently, no sufficient knowledge about it. – William Edwards Sep 20 '14 at 13:40
  • @BasileStarynkevitch I specified in question that I'm not looking for just a translator, because they usually can only translate at a syntax level, you still have to use target's language library (although I may be wrong). – mrpyo Sep 20 '14 at 13:56
  • If it's about the costs as I read in your comments: There are so many cheap VPS companies, like digital ocean etc, which give you a server for 5 dollars or even less per month. It it really the costs? – Luc Franken Sep 20 '14 at 16:16
5

If you hate PHP so much, you should avoid developing web applications to be hosted on PHP servers. Even if there would be any SDKs (and I don't know any), you would still need to to spend a great amount of time reading PHP—for example when debugging the application.

The same applies for language translators or supersets. A few years ago, I was working on a superset like that: a sort of PHP, but strongly typed when needed and with a set of features I liked in other languages, such as C#'s Code contracts (which cannot be implemented as-is in PHP). The only problem was that I still had to use PHP while debugging or profiling the apps.

In other words, TypeScript is great, but you still have to know JavaScript. LESS is great, but when things go wrong, you're back to the inspection of plain CSS code.

I may suggest you the following:

  • If you're doing a project for a customer who told you that he has only PHP-based hosting, discuss it with your customer. Tell that that you don't consider PHP as a great programming language. Tell that he has a choice between considering another hosting platform, or search for another person to develop the application for him.

  • If you're working on a product for sale which would be hosted on multiple platforms, consider either not supporting PHP (which could be a problem, given the number of inexpensive hosting providers which have PHP only) or hiring a team of skillful PHP developers to add the support.

Another important thing is that you should consider using a PHP framework (if you're not yet using one). Many popular PHP frameworks reduce the discomfort of PHP inconsistencies and abstract some of the weird parts of the language.

While I haven't tried it myself, Laravel seems promising.

  • I don't "hate" it, I just don't want to use it. But still it's a fact that PHP hosting is cheaper, and sadly it matters for me... – mrpyo Sep 20 '14 at 14:00
  • The old "php hosting is cheaper" argument really should not be a factor anymore - I don't think it was in 2014, and it certainly isn't now. I mean, really - if your clients can't afford cheap virtual hosting at like $10-$20/month, they definitely can't afford to hire a developer, so who are you trying to cater to? I've had dedicated virtual hosting for my own toy projects since 2002 at like $150/year. I think the primary reason anyone still chooses PHP, is because there are many PHP developers, and they're often cheaper than C# developers. That part is not about to change anytime soon. – mindplay.dk Jan 11 '17 at 17:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.