The Computer Language
Benchmarks Game

Perl programs versus PHP

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Perl 2.84 377,584 284 2.83 0% 1% 0% 100%
PHP 4.68 375,464 297 4.67 0% 0% 2% 100%
spectral-norm
source secs mem gz cpu cpu load
Perl 153.68 5,152 340 153.63 1% 0% 1% 100%
PHP 159.77 15,420 1135 159.71 1% 1% 1% 100%
k-nucleotide
source secs mem gz cpu cpu load
Perl 203.61 466,864 359 200.59 1% 1% 1% 100%
PHP 163.07 149,888 1060 161.59 1% 1% 1% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 1,697.45 3,240 427 1,696.90 1% 1% 1% 100%
PHP 1,135.14 7,008 441 1,134.86 1% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Perl 93.46 52,992 838 93.42 1% 1% 1% 100%
PHP 59.04 7,196 1030 59.02 0% 4% 1% 100%
pidigits
source secs mem gz cpu cpu load
Perl 4.51 5,452 261 4.51 0% 0% 1% 100%
PHP 2.81 8,264 394 2.80 0% 1% 1% 100%
n-body
source secs mem gz cpu cpu load
Perl 717.07 3,992 1401 716.84 1% 1% 1% 100%
PHP 420.03 7,016 1082 419.91 1% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Perl 488.62 209,208 448 488.38 1% 1% 1% 100%
PHP 164.95 1,137,716 483 164.80 1% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Perl   Failed
PHP 2.65 26,900 863 2.62 1% 0% 1% 100%
Perl

This is perl 5, version 24, subversion 0 (v5.24.0) built for i686-linux

PHP

PHP 7.0.6 (cli) (built: May 4 2016 12:35:58) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies