The Computer Language
Benchmarks Game

Perl programs versus PHP

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Perl 2.67 378,924 284 2.67 100% 0% 1% 0%
PHP 2.81 135,124 426 1.75 31% 21% 44% 57%
spectral-norm
source secs mem gz cpu cpu load
Perl 41.10 10,800 551 156.09 98% 94% 94% 94%
PHP 37.94 19,420 1135 150.67 99% 99% 100% 99%
k-nucleotide
source secs mem gz cpu cpu load
Perl 63.38 1,131,644 648 230.49 92% 90% 95% 89%
PHP 43.96 235,632 1060 142.28 87% 100% 71% 72%
pidigits
source secs mem gz cpu cpu load
Perl 3.53 6,836 261 3.52 0% 0% 1% 100%
PHP 2.15 9,884 394 2.15 1% 0% 100% 1%
fasta
source secs mem gz cpu cpu load
Perl 98.16 53,760 838 98.12 99% 1% 1% 1%
PHP 59.37 8,896 1030 59.36 5% 2% 3% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 525.84 12,832 565 2,063.84 98% 97% 100% 98%
PHP 280.04 33,588 1150 1,117.48 100% 100% 100% 100%
n-body
source secs mem gz cpu cpu load
Perl 758.94 5,052 1401 758.74 1% 1% 100% 1%
PHP 358.21 8,668 1082 358.12 17% 0% 1% 83%
binary-trees
source secs mem gz cpu cpu load
Perl 197.93 2,133,108 641 646.04 68% 71% 92% 96%
PHP 88.07 736,372 1027 247.49 92% 77% 23% 91%
regex-redux
source secs mem gz cpu cpu load
Perl 14.13 156,872 804 43.42 72% 89% 52% 95%
PHP 3.34 158,792 786 3.30 25% 26% 22% 92%
mandelbrot
source secs mem gz cpu cpu load
Perl 772.49 45,540 579 3,085.63 100% 100% 100% 100%
PHP 125.17 136,776 863 499.16 100% 100% 100% 100%
Perl

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

PHP

PHP 7.1.4 (cli) (built: Apr 16 2017 16:17:54) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies