Earlier quoted context omitted.
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
Perhaps you can send me down the righ path? I want my users to be able to send emails from their iPads, and those emails would be generated based on templates. There will be many such templates built in, and eventually users will be able to hire web developer-type person to make custom templates. My thinking was that PHP is the most popular language for that sort of thing, so it would be nice if could support that. M…
PHP 7 Virtual Machine
11–20 of 128 posts
Re: PHP 7 Virtual Machine
#12Earlier quoted context omitted.
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
Perhaps you can send me down the righ path? I want my users to be able to send emails from their iPads, and those emails would be generated based on templates. There will be many such templates built in, and eventually users will be able to hire web developer-type person to make custom templates. My thinking was that PHP is the most popular language for that sort of thing, so it would be nice if could support that. M…
You could use PHP but then you have a whole host of other stuff that you don't want or need in a templating language.
Re: PHP 7 Virtual Machine
#13It's always pleasant to see PHP occasionally get a positive moment in the limelight on HN. It's oft scorned yet powers a very large chunk of the web. With the work done on 7 it's also one of the fastest scripting languages around and deserves a little more credit if I'm honest.
Re: PHP 7 Virtual Machine
#14Earlier quoted context omitted.
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
Perhaps you can send me down the righ path? I want my users to be able to send emails from their iPads, and those emails would be generated based on templates. There will be many such templates built in, and eventually users will be able to hire web developer-type person to make custom templates. My thinking was that PHP is the most popular language for that sort of thing, so it would be nice if could support that. M…
If your app is in swift or objective-c, look into template libraries for those languages. Simple Google search tells me there's a couple of options including one using handlebar's format.
Re: PHP 7 Virtual Machine
#15It's always pleasant to see PHP occasionally get a positive moment in the limelight on HN. It's oft scorned yet powers a very large chunk of the web. With the work done on 7 it's also one of the fastest scripting languages around and deserves a little more credit if I'm honest.
I wholeheartedly agree. I've seen many cases of PHP being scorned in favour of Node.js in problem domains where PHP is a clear fit (I've been guilty of this myself). It's not at all a bad language in the hands the right person.
Re: PHP 7 Virtual Machine
#16It's fairly impressive that the php7 core team was able to release something that competes well with HHVM from a performance perspective. I assume they are working with significantly fewer advantages and resources than Facebook, so that's a pretty nice result.
HHVM was released in 2011, while PHP 7 was released in 2015. So perhaps in that extra time there was additional techniques, optimizations, and technology that allowed PHP 7 to stay comparable in terms of performance to HHVM.
Re: PHP 7 Virtual Machine
#17It's always pleasant to see PHP occasionally get a positive moment in the limelight on HN. It's oft scorned yet powers a very large chunk of the web. With the work done on 7 it's also one of the fastest scripting languages around and deserves a little more credit if I'm honest.
Re: PHP 7 Virtual Machine
#18It's always pleasant to see PHP occasionally get a positive moment in the limelight on HN. It's oft scorned yet powers a very large chunk of the web. With the work done on 7 it's also one of the fastest scripting languages around and deserves a little more credit if I'm honest.
Re: PHP 7 Virtual Machine
#19I wonder if it's possible to compile it for iOS? I need a templating engine in my app, and php seems like the most popular one.
PHP is a whole lot more than just a templating engine. I think you would find that much more effort than is required just to make some templates.
Re: PHP 7 Virtual Machine
#20Earlier quoted context omitted.
I wholeheartedly agree. I've seen many cases of PHP being scorned in favour of Node.js in problem domains where PHP is a clear fit (I've been guilty of this myself). It's not at all a bad language in the hands the right person.
out of pure ignorance -- what are the correct domains that either fit into?
1) APIs/programs relying on high concurrency and parallelism, especially where the handler(s) have to wait a lot for stuff like DB accesses
2) streaming (in the sense of websockets servers), PHP iirc can't even be used as a websocket server
3) Any API that can be implemented without needing too many async calls - you'll end up in callback hell or promise hell otherwise
PHP on the other hand has other use cases:
1) stuff that needs to be massively and easily deployed - you can grab PHP/MySQL/Apache hosting everywhere for either dead cheap or totally free. Examples include Wordpress, Drupal and MediaWiki
2) stuff that is highly complex in its flow. If your API requires dozens of DB calls, filesystem access, networking or just involves thousands of SLOC, you're better off writing it in PHP as it (since PHP5) carries a solid OOP stack - and even if you're not writing OOP code, being able to write program flows without dozens of promises is a breeze.
3) stuff that requires weird extensions to PHP. Basically there are bindings for everything and it's trivial to write your own binding to a library if it does not exist yet. For example, I have used PC/SC to interface with crypto smartcards, and it works surprisingly well.
4) shell scripts. PHP interpreters are widespread - OS X includes PHP by default and it's a $package_manager install php away on most Linux distributions. Perl and bash have their own strengths but honestly, Perl is outdated and PHP abstracts a load of stuff away, so you can write shellscripts that work on all major platforms without having to account for stuff like "does the OS have GNU grep, busybox grep or BSD grep".