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.91 134,048 426 1.79 67% 22% 61% 2%
spectral-norm
source secs mem gz cpu cpu load
Perl 41.10 10,800 551 156.09 98% 94% 94% 94%
PHP 41.23 17,104 1135 163.58 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 44.55 135,472 1060 152.16 81% 92% 76% 93%
pidigits
source secs mem gz cpu cpu load
Perl 3.53 6,836 261 3.52 0% 0% 1% 100%
PHP 2.19 8,852 394 2.18 100% 1% 0% 2%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 525.84 12,832 565 2,063.84 98% 97% 100% 98%
PHP 321.58 29,140 1150 1,280.13 100% 100% 99% 100%
fasta
source secs mem gz cpu cpu load
Perl 98.16 53,760 838 98.12 99% 1% 1% 1%
PHP 59.28 7,936 1030 59.26 1% 0% 1% 100%
n-body
source secs mem gz cpu cpu load
Perl 758.94 5,052 1401 758.74 1% 1% 100% 1%
PHP 432.48 7,928 1082 432.36 0% 100% 0% 1%
binary-trees
source secs mem gz cpu cpu load
Perl 213.12 1,385,276 706 716.32 97% 72% 96% 72%
PHP 103.82 ? 1161 ? 85% 88% 92% 75%
mandelbrot
source secs mem gz cpu cpu load
Perl 772.49 45,540 579 3,085.63 100% 100% 100% 100%
PHP 134.34 132,880 863 536.04 100% 100% 100% 100%
regex-redux
source secs mem gz cpu cpu load
  No program contribute your program
PHP 0.05 ? 786 0.05 20% 67% 33% 67%
Perl

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

PHP

PHP 7.0.6 (cli) (built: May 4 2016 16:00:18) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies