The Computer Language
Benchmarks Game

Perl programs versus PHP

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Perl 2.48 377,192 287 2.48 1% 0% 0% 100%
PHP 2.80 135,312 438 1.68 80% 9% 59% 3%
spectral-norm
source secs mem gz cpu cpu load
Perl 41.83 10,980 555 165.14 99% 99% 99% 98%
PHP 43.26 19,436 1152 172.15 100% 100% 100% 99%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
PHP 43.83 235,524 1079 146.88 80% 89% 73% 95%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
PHP 60.62 8,952 1062 60.61 0% 66% 35% 0%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
PHP 2.12 10,256 399 2.12 100% 0% 0% 1%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
PHP 387.92 8,708 1082 387.84 0% 34% 68% 0%
binary-trees
source secs mem gz cpu cpu load
Perl 183.13 2,199,432 648 609.32 83% 93% 77% 81%
PHP 91.40 736,224 1040 258.87 76% 88% 61% 59%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
PHP 244.56 33,692 1160 976.04 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
PHP 3.32 158,820 816 3.25 78% 27% 18% 39%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
PHP 142.21 135,060 875 564.00 100% 100% 100% 100%
Perl

This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi

PHP

PHP 7.1.11 (cli) (built: Nov 16 2017 15:22:17) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies