Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHP7 & Symfony 2 @ Symfony Barcelona May meetup

PHP7 & Symfony 2 @ Symfony Barcelona May meetup

Talk about PHP7 and Symfony 2 at the Symfony Barcelona May meetup with quite a lot more benchmarks than in my previous PHP7 talk. On top of that, PHP7 is now feature complete so this is what we are going to get!

Albert Casademont

May 22, 2015
Tweet

More Decks by Albert Casademont

Other Decks in Programming

Transcript

  1. Internals heavily modified data structs (current extensions won't work) call

    frame optimization new memory manager we finally have an AST! no JIT (yet)
  2. Internals Immutable arrays PCRE with JIT new JSON parser ...and

    lots more (watch Dmitry Stogof's talk on PHP7 internals for more!)
  3. x10

  4. Scalar type hinting Most wanted feature EVER! 2 flavors: weak

    & strict declare(strict_types=1); weak => casting strict => error
  5. Userland BC breaks New reserved keywords int, float, bool, string,

    true, false, null Symfony Validator BC Break!! True => IsTrue False => IsFalse Null => IsNull Available in SF >= 2.6.8, 2.3.29 LTS
  6. Test environment VM Debian 8 1GB RAM, 1 core, SSD

    ulabox.com sf2 index / product page (prod) sf2 demo bundle (dev), composer update PHP 5.5 / 5.6 / 7.0 opcache.validate_timestamps = 0 opcache.enable_file_override = 1 HHVM 3.7 hhvm.server_stat_cache = 1 No extensions! (APCu) Nginx, Redis, Solr, MySQL
  7. PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0

    HHVM 3.7 0 0.5 1 1.5 2 2.5 2.22 1.83 1.78 1.75 0.83 0.3 Time (seconds) Bench.php
  8. PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0

    HHVM 3.7 0 2 4 6 8 10 12 14 13.25 12.75 12.5 12.5 8.25 7.8 Memory consumption (MB) Bench.php
  9. PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0

    HHVM 3.7 0 5 10 15 20 25 30 35 29.97 29.91 29.17 12.47 17.86 Time (seconds) composer update --profile
  10. PHP 5.3 PHP 5.4 PHP 5.5 PHP 5.6 PHP 7.0

    HHVM 3.7 0 100 200 300 400 500 600 700 800 900 812 812 812 551 316 Memory consumption (MB) composer update --profile
  11. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 5

    10 15 20 25 30 26 24 13 19 Time (milliseconds) SF2 - AcmeDemo
  12. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 2

    4 6 8 10 12 10.75 10.75 4.75 0.48 Memory consumption (MB) SF2 - AcmeDemo
  13. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 10

    20 30 40 50 60 70 80 90 81 76 44 56 Time (milliseconds) SF2 – ulabox index
  14. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 2

    4 6 8 10 12 14 16 18 20 17.25 17.25 12 4.19 Memory consumption (MB) SF2 – ulabox index
  15. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 20

    40 60 80 100 120 109 103 60 72 Time (milliseconds) SF2 – ulabox product
  16. PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.7 0 5

    10 15 20 25 20.75 20.5 14 5 Memory consumption (MB) SF2 – ulabox product