Pierre-Luc Posted March 29, 2015 Share Posted March 29, 2015 Hey guys! You probably have been following the recent announcements regarding the next PHP version, 7.. I'm pretty excited about scalar type hinting, return type declarations (although void didn't pass ) and much improved performance! What are you most looking forward to, what are you sad isn't there? Some extra reading: - PHP RFCs — https://wiki.php.net/rfc/howto - Fun little infographic from Zend — https://pages.zend.com/TY-Infographic.html 3 Link to comment Share on other sites More sharing options...
Mike Rockett Posted March 29, 2015 Share Posted March 29, 2015 Hehe, I was going to open up a topic this morning - beat me to it! ;-) I'm quite excited, and very much looking forward to working with it. Return types look cool - I see they still need to add support for a whole bunch of them. I agree with there not being a void return type though. If I'm not returning anything, then I shouldn't need to declare a type. Btw, you've linked to the infographic twice... ;-) Link to comment Share on other sites More sharing options...
MatthewSchenker Posted March 29, 2015 Share Posted March 29, 2015 Greetings, This is very exciting. I'd be curious to know what this means for ProcessWire. One very noticable point: check out the performance of Drupal in graphic #4! Thanks, Matthew Link to comment Share on other sites More sharing options...
LostKobrakai Posted March 29, 2015 Share Posted March 29, 2015 I'm personally really not that interested in the development front of php. As long as I have to even switch servers of clients that the minimum requirements for PW are met I can't possibly benefit from anything mentioned there. I'm happy if I have php >= 5.4. 6 Link to comment Share on other sites More sharing options...
Pete Posted March 29, 2015 Share Posted March 29, 2015 But that performance increase might be nice for servers where you could request an upgrade 2 Link to comment Share on other sites More sharing options...
Pierre-Luc Posted March 30, 2015 Author Share Posted March 30, 2015 @LostKobrai, well in general terms type hinting is a good sanity check when developing anything remotely complex. The fact that you can hint any class but not string, arrays, int or else has always been an annoyance of mine (not passing the right type will give a fatal error). Most of these are niceties I agree though. I'm mostly excited to run benchmarks on non cached PW instances. Can it really get any faster ? Will the page load before even clicking links ? ;P 1 Link to comment Share on other sites More sharing options...
apeisa Posted March 30, 2015 Share Posted March 30, 2015 It's very rare to php be a bottleneck regarding most websites and apps. 2 sec pageload contains very little php processing. So huge performance boost there will give very little to overall loading times. Not saying it's bad thing (of course not), but most of the usual website performance is front end. 1 Link to comment Share on other sites More sharing options...
teppo Posted March 30, 2015 Share Posted March 30, 2015 There are resource-intensive tasks, though, and especially for very dynamic sites where caching is less helpful this could be a good thing. I'll admit that it probably doesn't mean shit for my personal site, but in the case of large services (or if you're hosting a lot of stuff) smaller savings here and there add up. So, if anyone's looking to build the next Facebook completely in PHP, better wait until 7 is out. Would be interesting to hear how PHP7, with all it's speed improvements, compares to HHVM though.. or is that comparing apples to oranges? I'll have to agree with LostKobrakai too. It'll take a very long time until this is widely used. For the most part 7 coming out will just mean that we can start using it for our own, cutting-edge projects (or projects big enough to justify setting up a customised server environment). 2 Link to comment Share on other sites More sharing options...
Christophe Posted October 7, 2015 Share Posted October 7, 2015 There is also HippyVM, as you might/may already know. 1 Link to comment Share on other sites More sharing options...
BitPoet Posted December 9, 2015 Share Posted December 9, 2015 I've got PHP 7 running on my home computers and everything works like a charm. I can't say anything about massive speedups (everything's in the <10% range so far) but then, the complexity of my home playground is rather limited, but I'll start load testing in the company in January and hope to find some more impressive figures there. What bugs me a bit is that I haven't found a working server-based memory cache for Windows yet. Memcached, Redis, you name it, it's not yet available. I'm curious if I missed something there. Are there any in-memory key-value storage servers for Windows with PHP 7 support worth taking a look at? Link to comment Share on other sites More sharing options...
gurkendoktor Posted December 19, 2015 Share Posted December 19, 2015 Just tried it on a rather old test installation (default profile) and it worked like a charm. This Thing Is Flying! HipHop VM (HHVM) I tried before, it's also quite fast but I'm not sure about the coverage in more complex systems. Link to comment Share on other sites More sharing options...
gurkendoktor Posted December 26, 2015 Share Posted December 26, 2015 Well, according to my short tests with very unscientific methods, HHVM still overtakes PHP, runs to the finish line and back to start just to overtake PHP again. With a normal ab -c20 -n500, HHVM is approximately 24 times faster than PHP 7, under higher load (-c100) this scales up to 60 times. Then the saturation is reached for this small server I'm testing this against. Of course, both are tested out of the box and with a PHP opcode cache you could actually gain more performance. EDIT: Caching was still on, the numbers are wrong. The server was delivering static pages. However, this is a good demonstration of fcgi_cache. However, PHP7 is still super fast compared to 5.4 or 5.5 – and probably has less side effects in large production environment. Or at least they are documented. Let's say it like this: if you have moderate traffic on your site and your application is decently written, you will probably won't note much of a difference. And if you have high traffic, you might face other bottlenecks than PHP, especially if you work with highly dynamic content. 2 Link to comment Share on other sites More sharing options...
pwired Posted December 27, 2015 Share Posted December 27, 2015 hhvm works with a language called hack which is similar to php, example: <?hh echo "Hi, I'm a Hack script!"; Will this ever work with Processwire ? Do you have an example how to install hhvm on a day to day host out there ? Link to comment Share on other sites More sharing options...
gurkendoktor Posted December 27, 2015 Share Posted December 27, 2015 hhvm works with a language called hack which is similar to php, example: <?hh echo "Hi, I'm a Hack script!"; Yes, but HHVM is also a JIT compiler to PHP like V8 for JavaScript.Will this ever work with Processwire ? Do you have an example how to install hhvm on a day to day host out there ?Yes, in fact it does. I'll make a tutorial the next days. 3 Link to comment Share on other sites More sharing options...
gurkendoktor Posted December 27, 2015 Share Posted December 27, 2015 I couldn't believe my own numbers, so I checked again. Turns out, HHVM still had caching enabled – my bad. It's still faster, but these numbers are not real. It's rather 1.5x faster. I have to get a bigger server to see how it scales out on multiple CPUs and when it's hitting limits. I will not longer reply on this thread, as it is about PHP7. I made a new one. Link to comment Share on other sites More sharing options...
gurkendoktor Posted January 12, 2016 Share Posted January 12, 2016 Well, now I come back with something PHP 7 related. So if you upgrade your server to PHP7 and you happen to have PHP run as php-fpm, then DO NOT FORGET to install php7.0-mysql. I was scratching my head for almost half an hour where this strange 500 error stems from. Everything was working fine (info.php, some tests, another website), until I figured that the difference between "the other site" and my PW site was the database. Just a heads up, keep it in mind when you run into an error Link to comment Share on other sites More sharing options...
gurkendoktor Posted January 12, 2016 Share Posted January 12, 2016 A comprehensible tutorial also covering Apache is here: https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04 (Basically it's all the documentation and the output of the CLI tools compiled and put in a human readable format ) Link to comment Share on other sites More sharing options...
alvirtuoso Posted February 4, 2016 Share Posted February 4, 2016 So, is the answer YES processwire is compatible with PHP 7? Link to comment Share on other sites More sharing options...
Beluga Posted February 5, 2016 Share Posted February 5, 2016 So, is the answer YES processwire is compatible with PHP 7? Well I am running PW 2.7 in OVH shared hosting with PHP 7 and no issues so far. 1 Link to comment Share on other sites More sharing options...
gurkendoktor Posted February 6, 2016 Share Posted February 6, 2016 i'm running a site in production on PHP7, no problems. depends a lot on the modules you use i guess. core should be no problem at all. 1 Link to comment Share on other sites More sharing options...
Recommended Posts