DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Join us tomorrow at 1 PM EST: "3-Step Approach to Comprehensive Runtime Application Security"
Save your seat
  1. DZone
  2. Coding
  3. Languages
  4. PHP 5.4 Benchmarks

PHP 5.4 Benchmarks

Lorna Mitchell user avatar by
Lorna Mitchell
·
Aug. 13, 12 · Interview
Like (0)
Save
Tweet
Share
6.54K Views

Join the DZone community and get the full member experience.

Join For Free

My talk includes some benchmarks which I thought I'd also share here, mostly because I like pretty graphs - and this one is pretty:

graph comparing performance of PHP versions

This graph shows the performance of four versions of PHP (because the bench.php script that lives in the php source tree didn't appear until 5.1). The axis up the left is the time it took to run the benchmark script - so a smaller number is better news.

For each run:

  • I grabbed PHP source code for the newest version of each of PHP 5.1 through to PHP 5.4 (and then had to do that again 2 weeks later when we released new versions of PHP 5.3 and 5.4)
  • Compiled them with their "vanilla" settings - none of these versions has any extensions added or is the PHP version I actually use
  • Ran the bench.php script 10 times and collected the data (full table below)
  • Averaged the data and put it on the nice google chart

If you're interested in the raw numbers, this is what I have:

Version run0 run1 run2 run3 run4 run5 run6 run7 run8 run9   avg
PHP 5.1.6 3.985 4.038 3.912 3.966 4.006 3.963 3.973 3.939 3.969 3.981   3.9732
PHP 5.2.17 4.28 4.147 4.005 4.071 4.116 4.096 4.054 4.099 4.077 4.103   4.1048
PHP 5.3.14 2.786 2.831 2.762 2.789 2.761 2.972 2.825 2.772 2.749 2.753   2.8
PHP 5.4.4 2.441 2.237 2.228 2.216 2.216 2.224 2.232 2.229 2.237 2.251   2.2511
 

(with thanks to textfixer.com for a CSV->HTML table conversion tool)

So there you have it: PHP 5.4 is measurably faster than the previous versions of PHP 5.3 (but not twice as fast). Time to upgrade?

PHP

Published at DZone with permission of Lorna Mitchell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is a Kubernetes CI/CD Pipeline?
  • How To Check Docker Images for Vulnerabilities
  • Bye Bye, Regular Dev [Comic]
  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: