The Computer Language
Benchmarks Game

Perl programs versus PHP

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Perl 10.61 1,493,876 287 10.59 0% 1% 100% 0%
PHP 12.08 516,904 438 7.57 3% 59% 29% 59%
spectral-norm
source secs mem gz cpu cpu load
Perl 41.83 10,980 555 165.14 99% 99% 99% 98%
PHP 37.09 20,208 1152 147.78 100% 100% 100% 100%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
PHP 41.39 242,044 1079 133.27 83% 76% 73% 91%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
PHP 2.12 10,664 399 2.11 100% 0% 1% 1%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
PHP 59.12 9,412 1062 59.11 40% 0% 1% 60%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
PHP 353.84 9,220 1082 353.77 0% 100% 1% 0%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
PHP 233.57 34,748 1160 929.49 100% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Perl 183.13 2,199,432 648 609.32 83% 93% 77% 81%
PHP 65.20 736,468 868 235.57 93% 94% 92% 98%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
PHP 2.63 270,048 816 2.46 38% 39% 85% 38%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
PHP 118.07 137,452 875 471.57 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.2.0 (cli) (built: Nov 30 2017 10:13:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies