In the past this information has been suppressed
but now it can be told
Slide 3
Slide 3 text
We're all Devo
Slide 4
Slide 4 text
We're all Devs
Slide 5
Slide 5 text
Let's look to the future
Slide 6
Slide 6 text
The futch
Slide 7
Slide 7 text
PHP 7
Slide 8
Slide 8 text
PHP 7 Beta
June 2015
Slide 9
Slide 9 text
PHP 7 Release
November 2015
(Probably)
Slide 10
Slide 10 text
There's a PHP 7 Vagrant
Slide 11
Slide 11 text
Vagrant is a tool for building
complete development
environments. With an easy-to-use
workflow and focus on automation,
Vagrant lowers development
environment setup time, increases
development/production parity,
and makes the "works on my
machine" excuse a relic of the past.
— About Vagrant
Slide 12
Slide 12 text
Caveat
Slide 13
Slide 13 text
PHP version adoption stinks
(Especially at the host level)
Slide 14
Slide 14 text
Let's look at PHP 5 adoption
Slide 15
Slide 15 text
The Majority 1
• PHP 5.3 — 41.4%
• Release Date: June 30, 2009
• End of Life: August 14, 2014
• PHP 5.4 — 30.1%
• Release Date: March 1, 2012
• End of Life: September 12, 2015
1 Numbers from w3Techs as of June 2, 2015.
Slide 16
Slide 16 text
Let that sink in...
Slide 17
Slide 17 text
71.5% of all PHP sites
are powered by versions
that will be dead
by the end of Summer 2015
Slide 18
Slide 18 text
Legacy PHP bad
Slide 19
Slide 19 text
The Minority 1
• PHP 5.5 — 9.3%
• Release date: June 20, 2013
• End of Life: June 20, 2016
• PHP 5.6 — 1.5%
• Release Date: August 28, 2014
• End of Life: August 28, 2017
1 Numbers from w3Techs as of June 2, 2015.
Slide 20
Slide 20 text
PHP 5.5 will be
End of Life'd
by this time next year
Slide 21
Slide 21 text
How long will it be
until enough hosts support PHP 7?
Slide 22
Slide 22 text
How long can we wait?
Slide 23
Slide 23 text
There is another
Slide 24
Slide 24 text
HHVM
Slide 25
Slide 25 text
How is HHVM better?
HHVM compiles PHP to an intermediate bytecode. The
bytecode then gets translated to machine code by a just-in-
time (JIT) compiler. Doing this removes the usual interpreted
execution bottlenecks that come with using native PHP.
On top of that, HHVM analyzes your code as it
runs. After it collects enough data, HHVM
performs optimizations on what it considers to be
frequently invoked and expensive pieces of code.
TL;DR: It's fast. And smart.
Slide 26
Slide 26 text
But how much faster?
WordPress 4.1.x with 20 concurrent users.
• Requests per second
• PHP 5.5: 256
• PHP 7: 627
• HHVM 3.7: 666
• Latency
• PHP 5.5: 78 milliseconds
• PHP 7: 32 milliseconds
• HHVM 3.7: 30 milliseconds
Slide 27
Slide 27 text
So what's the catch?
• The HHVM compiler is strict.
• If you're using poorly written code, things
can go sideways. Fast.
• The occasional memory leak.
• Long running PHP processes can chew up
tons of RAM.
• Scheduled restarts of HHVM processes are
not uncommon.
Slide 28
Slide 28 text
But don't let that scare you
There are large companies already using HHVM
in production
• Facebook
• Wikipedia
• Etsy
• Box
There's an HHVM Vagrant
And it's made for WordPress development
Slide 31
Slide 31 text
HGV
https://github.com/wpengine/hgv
Slide 32
Slide 32 text
Built by WP Engine
for our Mercury platform
Slide 33
Slide 33 text
No matter where you host your site,
you can use HGV to test your code
Slide 34
Slide 34 text
HGV
• Built with members of the 10up team
• Work on your code under PHP 5.5 & HHVM at the same time
• Debugging & benchmarking tools
• Xdebug
• XHProf
• Siege
• query-monitor
• debug-objects
• debug-bar
Install
git clone --recursive https://github.com/wpengine/hgv.git
cd hgv
vagrant up
Slide 38
Slide 38 text
While HGV installs, make yourself a drink
It should only take about 30 minutes
Slide 39
Slide 39 text
Get to work
• Local file access
• Use your favorite text editor!
• [HGV_dir]/hgv_data/sites/[hhvm|php]/
• [HGV_dir]/hgv_data/sites/[hhvm|php]/wp-content/
[plugins|themes]/
• SSH
• vagrant ssh
• phpMyAdmin
• admin.hgv.dev/phpmyadmin/
Slide 40
Slide 40 text
Coming Soon in HGV 1.3
• One Vagrant to rule them all
• Configure multiple installs & domains
• Adds the domains to your hosts file
• Provisioned via a YML file
---
enviro: trunk
hhvm_domains:
- hhvm.trunk.hgv.dev
php_domains:
- trunk.hgv.dev
Slide 41
Slide 41 text
So we've got that goin' for us,
which is nice
Slide 42
Slide 42 text
Questions?
Slide 43
Slide 43 text
It's time to go beyond the normal thing.
It's time to do the super thing.
Follow @boogah on Twitter.