{"id":11778,"date":"2015-12-01T10:00:10","date_gmt":"2015-12-01T16:00:10","guid":{"rendered":"https:\/\/wpengine.com\/?p=11778"},"modified":"2025-02-25T07:27:38","modified_gmt":"2025-02-25T13:27:38","slug":"php-7-the-way-of-the-future","status":"publish","type":"post","link":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/","title":{"rendered":"PHP 7: The Way Of The Future"},"content":{"rendered":"<p>Here at WP Engine we&#8217;ve been looking at ways to bring the speed of our HHVM based Mercury platform to even more of our customers. Fortunately, the PHP team has spent the past year (or so) in a speed war with Facebook&#8217;s HHVM team.<\/p>\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\">\n<p lang=\"en\" dir=\"ltr\">Zend claims <a href=\"https:\/\/twitter.com\/hashtag\/PHP?src=hash&amp;ref_src=twsrc%5Etfw\">#PHP<\/a> 7 is faster than <a href=\"https:\/\/twitter.com\/hashtag\/HHVM?src=hash&amp;ref_src=twsrc%5Etfw\">#HHVM<\/a>, with data. Facebook claims HHVM is faster, with data. Either way, your code gets faster. <a href=\"https:\/\/twitter.com\/hashtag\/ZendCon?src=hash&amp;ref_src=twsrc%5Etfw\">#ZendCon<\/a><\/p>\n<p>&mdash; Larry Garfield (@Crell) <a href=\"https:\/\/twitter.com\/Crell\/status\/656545168615575552?ref_src=twsrc%5Etfw\">October 20, 2015<\/a><\/p><\/blockquote>\n<p><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p>According to tests by each respective team, HHVM and PHP 7 have been neck and neck when it comes to the number of raw, uncached hits they\u2019re able to handle. We&#8217;re seeing some really impressive numbers out of PHP 7, however.<\/p>\n<p>Now, while I don&#8217;t have anything to announce as far as PHP 7 availability goes \u2014 it hasn\u2019t even been officially released yet \u2014 you can bet that we&#8217;re working hard to bring a stable, performant implementation to our customers.<\/p>\n<p>To wet your whistle, let&#8217;s take a look at the raw data from a siege test \u2014 25 concurrent users over 5 minutes across 10 randomly selected URLs \u2014 run against a basic WordPress (4.3.1) install on our Mercury Vagrant&#8230;<\/p>\n<h3><b>PHP 5.5<\/b><\/h3>\n<pre>Transactions:              4354 hits\nAvailability:              100.00 %\nElapsed time:              299.64 secs\nData transferred:          17.23 MB\nResponse time:             1.21 secs\nTransaction rate:          14.53 trans\/sec\nThroughput:                0.06 MB\/sec\nConcurrency:               17.59\nSuccessful transactions:   4354\nFailed transactions:       0\nLongest transaction:       2.04\nShortest transaction:      0.12<\/pre>\n<h3><b>HHVM<\/b><\/h3>\n<pre>Transactions:              5256 hits\nAvailability:              100.00 %\nElapsed time:              299.53 secs\nData transferred:          20.06 MB\nResponse time:             0.92 secs\nTransaction rate:          17.55 trans\/sec\nThroughput:                0.07 MB\/sec\nConcurrency:               16.12\nSuccessful transactions:   5256\nFailed transactions:       0\nLongest transaction:       11.54\nShortest transaction:      0.43<\/pre>\n<h3><b>PHP 7<\/b><\/h3>\n<pre>Transactions:              11333 hits\nAvailability:              100.00 %\nElapsed time:              299.38 secs\nData transferred:          44.84 MB\nResponse time:             0.16 secs\nTransaction rate:          37.85 trans\/sec\nThroughput:                0.15 MB\/sec\nConcurrency:               6.16\nSuccessful transactions:   11333\nFailed transactions:       0\nLongest transaction:       0.77\nShortest transaction:      0.02<\/pre>\n<p>This install was populated with dummy data from <a href=\"http:\/\/wptest.io\/\" target=\"_blank\" rel=\"noopener\">WP Test<\/a>, used Twenty Fifteen for its theme and had Yoast SEO, Contact Form 7, and WordPress Importer active.<\/p>\n<p><a href=\"https:\/\/wpengine.com\/wp-content\/uploads\/2015\/11\/php7-graph1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11782\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2015\/11\/php7-graph1.png\" alt=\"php7-graph1\" width=\"1992\" height=\"1292\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1.png 1992w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1-300x195.png 300w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1-768x498.png 768w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1-1024x664.png 1024w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1-222x144.png 222w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph1-874x567.png 874w\" sizes=\"auto, (max-width: 1992px) 100vw, 1992px\" \/><\/a><\/p>\n<p>As you can see, the number of raw hits that could be handled under HHVM (1.2x faster) was one-upped by the PHP 7 (2.6x faster) implementation. It gets even more exciting when you look at a similar test \u2014 25 concurrent users, 5 minutes, 10 randomly selected URLs \u2014 for bbPress&#8230;<\/p>\n<h2><b>WordPress (4.3.1) + bbPress (2.5.8)<\/b><\/h2>\n<h3><b>PHP 5.5<\/b><\/h3>\n<pre>Transactions:              680 hits\nAvailability:              100.00 %\nElapsed time:              299.29 secs\nData transferred:          3.54 MB\nResponse time:             10.29 secs\nTransaction rate:          2.27 trans\/sec\nThroughput:                0.01 MB\/sec\nConcurrency:               23.39\nSuccessful transactions:   680\nFailed transactions:       0\nLongest transaction:       12.39\nShortest transaction:      1.51<\/pre>\n<h3><b>HHVM<\/b><\/h3>\n<pre>Transactions:              3194 hits\nAvailability:              100.00 %\nElapsed time:              299.41 secs\nData transferred:          12.55 MB\nResponse time:             1.84 secs\nTransaction rate:          10.67 trans\/sec\nThroughput:                0.04 MB\/sec\nConcurrency:               19.67\nSuccessful transactions:   3194\nFailed transactions:       0\nLongest transaction:       15.37\nShortest transaction:      1.12<\/pre>\n<h3><b>PHP 7<\/b><\/h3>\n<pre>Transactions:              4521 hits\nAvailability:              100.00 %\nElapsed time:              299.28 secs\nData transferred:          23.52 MB\nResponse time:             1.15 secs\nTransaction rate:          15.11 trans\/sec\nThroughput:                0.08 MB\/sec\nConcurrency:               17.38\nSuccessful transactions:   4521\nFailed transactions:       0\nLongest transaction:       2.21\nShortest transaction:      0.60<\/pre>\n<p>This install was populated with dummy data from <a href=\"http:\/\/www.epicwebs.co.uk\/bbpress-tutorials\/test-data-for-bbpress-plugin\/\" target=\"_blank\" rel=\"noopener\">EpicWebs bbPress Test Data<\/a>, used Twenty Fifteen for its theme and had Yoast SEO active.<\/p>\n<p><a href=\"https:\/\/wpengine.com\/wp-content\/uploads\/2015\/11\/php7-graph2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-11783\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2015\/11\/php7-graph2.png\" alt=\"php7-graph2\" width=\"1992\" height=\"1292\" srcset=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2.png 1992w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2-300x195.png 300w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2-768x498.png 768w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2-1024x664.png 1024w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2-222x144.png 222w, https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-graph2-874x567.png 874w\" sizes=\"auto, (max-width: 1992px) 100vw, 1992px\" \/><\/a><\/p>\n<p>While HHVM (4.7x faster) presents a fairly significant bump in the number of raw hits it can handle, PHP 7 (6.6x faster) still edges it out in pure performance. This means once we&#8217;re ready to make PHP 7 widely available, most customers will see serious performance gains without having to do much more than make sure their plugins, themes, and core install are up to date.<\/p>\n<p>I\u2019m sure if you\u2019ve read this far, you\u2019re probably pretty interested in playing with PHP 7. If so, consider downloading the Mercury Vagrant and testing your current site against the PHP 7 implementation we&#8217;ve provided there.<\/p>\n<p>Should installing a Vagrant and testing something on HGV be outside of your comfort zone, I shared some HGV setup and quickstart tips in <a href=\"http:\/\/www.slideshare.net\/boogah\/way-of-the-future\" target=\"_blank\" rel=\"noopener\">a presentation<\/a> I gave at WordCamp Sacramento earlier this month. Feel free to go over my slides if you&#8217;d like!<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.slideshare.net\/slideshow\/embed_code\/key\/FF1C78TiPbasLA\" width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;\" allowfullscreen> <\/iframe> <\/p>\n<div style=\"margin-bottom:5px\"> <strong> <a href=\"https:\/\/www.slideshare.net\/boogah\/way-of-the-future\" title=\"Way of the Future\" target=\"_blank\">Way of the Future<\/a> <\/strong> from <strong><a href=\"https:\/\/www.slideshare.net\/boogah\" target=\"_blank\">Jason Cosper<\/a><\/strong> <\/div>\n<p>Happy testing!<\/p>\n<hr \/>\n<address><a href=\"https:\/\/wpengine.com\/wp-content\/uploads\/2014\/12\/cosper-2014.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-6579 size-thumbnail\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2014\/12\/cosper-2014-150x150.jpg\" alt=\"Jason Cosper\" width=\"150\" height=\"150\" \/><\/a><a href=\"https:\/\/twitter.com\/boogah\" target=\"_blank\" rel=\"noopener\">Jason Cosper<\/a> works as the Developer Advocate for WP Engine. He loves digging into interesting problems and learning new things. Currently, he spends most of his days getting elbows deep in huge messes and doling out WordPress optimization advice. In his spare time, Cosper enjoys spending time with his wife and very tiny dog, grilling meats, sampling assorted whiskeys, writing cranky tweets about the Lakers and brewing coffee.<\/address>\n","protected":false},"excerpt":{"rendered":"<p>Here at WP Engine we&#8217;ve been looking at ways to bring the speed of our HHVM based Mercury platform to even more of our customers. Fortunately, the PHP team has spent the past year (or so) in a speed war with Facebook&#8217;s HHVM team. Zend claims #PHP 7 is faster than #HHVM, with data. Facebook<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":12,"featured_media":11780,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[447,361,375,468],"class_list":["post-11778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-development","tag-hhvm","tag-mercury-vagrant","tag-php-7"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP 7: The Way Of The Future | WP Engine<\/title>\n<meta name=\"description\" content=\"Explore the advantages of PHP 7 and why it&#039;s the future of web development. Learn how upgrading to PHP 7 can improve your site&#039;s performance and efficiency.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP 7: The Way Of The Future | WP Engine\" \/>\n<meta property=\"og:description\" content=\"Explore the advantages of PHP 7 and why it&#039;s the future of web development. Learn how upgrading to PHP 7 can improve your site&#039;s performance and efficiency.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-01T16:00:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-25T13:27:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-future.650.png\" \/>\n\t<meta property=\"og:image:width\" content=\"650\" \/>\n\t<meta property=\"og:image:height\" content=\"270\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jason Cosper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpengine\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jason Cosper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/\",\"url\":\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/\",\"name\":\"PHP 7: The Way Of The Future | WP Engine\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#website\"},\"datePublished\":\"2015-12-01T16:00:10+00:00\",\"dateModified\":\"2025-02-25T13:27:38+00:00\",\"author\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/b94cce7a7a7735bb6773209205593e5c\"},\"description\":\"Explore the advantages of PHP 7 and why it's the future of web development. Learn how upgrading to PHP 7 can improve your site's performance and efficiency.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP 7: The Way Of The Future\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/resources\/#website\",\"url\":\"https:\/\/wpengine.com\/resources\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/resources\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/b94cce7a7a7735bb6773209205593e5c\",\"name\":\"Jason Cosper\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/86506a1ad877216ba536a237bb92ad01829cdae7c5d4dad6451ddb36819e59d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/86506a1ad877216ba536a237bb92ad01829cdae7c5d4dad6451ddb36819e59d0?s=96&d=mm&r=g\",\"caption\":\"Jason Cosper\"},\"description\":\"Jason Cosper works as a Developer Advocate for WP Engine. Honestly, that\u2019s just a fancy way of saying \u201cI get paid to chat with people about WordPress.\u201d You can follow him on Twitter @boogah\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP 7: The Way Of The Future | WP Engine","description":"Explore the advantages of PHP 7 and why it's the future of web development. Learn how upgrading to PHP 7 can improve your site's performance and efficiency.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"PHP 7: The Way Of The Future | WP Engine","og_description":"Explore the advantages of PHP 7 and why it's the future of web development. Learn how upgrading to PHP 7 can improve your site's performance and efficiency.","og_url":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_published_time":"2015-12-01T16:00:10+00:00","article_modified_time":"2025-02-25T13:27:38+00:00","og_image":[{"width":650,"height":270,"url":"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2015\/11\/php7-future.650.png","type":"image\/png"}],"author":"Jason Cosper","twitter_card":"summary_large_image","twitter_creator":"@wpengine","twitter_site":"@wpengine","twitter_misc":{"Written by":"Jason Cosper","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/","url":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/","name":"PHP 7: The Way Of The Future | WP Engine","isPartOf":{"@id":"https:\/\/wpengine.com\/resources\/#website"},"datePublished":"2015-12-01T16:00:10+00:00","dateModified":"2025-02-25T13:27:38+00:00","author":{"@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/b94cce7a7a7735bb6773209205593e5c"},"description":"Explore the advantages of PHP 7 and why it's the future of web development. Learn how upgrading to PHP 7 can improve your site's performance and efficiency.","breadcrumb":{"@id":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/resources\/php-7-the-way-of-the-future\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/resources\/"},{"@type":"ListItem","position":2,"name":"PHP 7: The Way Of The Future"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/resources\/#website","url":"https:\/\/wpengine.com\/resources\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/resources\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/b94cce7a7a7735bb6773209205593e5c","name":"Jason Cosper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/86506a1ad877216ba536a237bb92ad01829cdae7c5d4dad6451ddb36819e59d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/86506a1ad877216ba536a237bb92ad01829cdae7c5d4dad6451ddb36819e59d0?s=96&d=mm&r=g","caption":"Jason Cosper"},"description":"Jason Cosper works as a Developer Advocate for WP Engine. Honestly, that\u2019s just a fancy way of saying \u201cI get paid to chat with people about WordPress.\u201d You can follow him on Twitter @boogah"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/11778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/comments?post=11778"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/11778\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media\/11780"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media?parent=11778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/categories?post=11778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/tags?post=11778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}