I was wondering given the learning curve of PHP, it would be really helpful if we can create better and performant mobile apps using PHP.
Is it possible today? Has anyone done it?
to unify @amir_anwar and @mgiambanco .
PHP can be used as an API or you can use a container to make it look like it's "an app" but in the end PHP runs on the sever not the client.
So in short -> NO atm you cannot use PHP for a native APP.
What you can do is -> write the app in angular or react or vue or cycle or another javascript framework of your choice and use PHP as the server cloud API backend.
that's for example how whatsapp was built it was a dumb PHP script that grew and grew :)
you can take a look into phonegap / cordova or react native or the ionic framework.
In Android I have deeply searched this issue before My findings are: If you want to create a professional application, you don't have any option but java but still there are other options available like c++ , python, kotlin , react native, ionic,.. Never heard that PHP can be used though, I might be wrong off course But again, all of those options can never be compared to native Java Sdk
I've found - you become an app developer or you become a web developer. JS can be used for mobile with React Native, Cordova, etc... for quick and dirty apps - sure - but why take the short cut? If you want to be an app developer, learn the native languages (swift for iOS / java for Android) and get ahead of the curve. Ask any Android developer; ask any iOS developer. The differences UI wise keep getting wider and wider that most times, it's really not worth it to get 1 app to do both well. You'll always get the best quality with native. Again - quick and dirty / get it out the door - go for isomorphic. A quality app the maybe wins a design award? Has an isomorphic ever won one?
edit - not saying most of us are out to win awards - give me a functional app over a pretty app any day (if i can have both, awesome) but function always trumps aesthetics. Look at hacker news - by modern design standards, it's downright ugly - but it does it's job (disseminate programmer / IT news) and it does it damn well. None of the stack exchange websites are "OMG what a great looking site" - but they get the job done well. These examples are websites obviously, but the same can be applied to apps. And you get the best function with native.
Alexandre Lalung
Web Developer
Leander Berg
Mario Giambanco
Director of User Experience Development
This SO conversation leads to this article which ultimately leads to Zend Studio 10
So it looks like any other JS to Objective-C / Swift interpreter / compiler.
That said - I'm a big long time PHP user (over 15 years) - 2 weeks ago I started writing my first iPhone app in Swift 3 and I really didn't find it difficult at all - there are a ton of posts on SO, examples around the net, etc... to get you going in any aspect of it. There is a learning curve for sure, but nothing trumps a pure, native iOS app IMO.