The Computer Language
Benchmarks Game

PHP programs versus Python 3

by benchmark task performance

spectral-norm
source secs KB gz cpu cpu load
PHP 159.77 15,420 1135 159.71 1% 1% 1% 100%
Python 3 1,105.41 7,120 328 1,105.02 1% 0% 0% 100%
regex-dna
source secs KB gz cpu cpu load
PHP 4.79 105,376 832 4.78 1% 0% 1% 100%
Python 3 25.11 249,088 478 24.98 1% 0% 1% 100%
binary-trees
source secs KB gz cpu cpu load
PHP 164.95 1,137,716 483 164.80 1% 1% 1% 100%
Python 3 497.80 482,656 596 497.40 1% 1% 1% 100%
n-body
source secs KB gz cpu cpu load
PHP 420.03 7,016 1082 419.91 1% 1% 1% 100%
Python 3 1,024.87 6,324 1228 1,024.54 1% 0% 1% 100%
fannkuch-redux
source secs KB gz cpu cpu load
PHP 1,135.14 7,008 441 1,134.86 1% 1% 1% 100%
Python 3 2,464.08 44,564 944 2,463.20 1% 0% 0% 100%
fasta
source secs KB gz cpu cpu load
PHP 59.04 7,196 1030 59.02 0% 4% 1% 100%
Python 3 122.25 6,508 977 122.19 1% 1% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
PHP 163.07 149,888 1060 161.59 1% 1% 1% 100%
Python 3 317.42 219,028 1937 317.16 0% 1% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
PHP 696.23 130,700 863 696.02 1% 1% 1% 100%
Python 3 1,209.01 40,500 686 1,208.52 1% 0% 1% 100%
reverse-complement
source secs KB gz cpu cpu load
PHP 4.68 375,464 297 4.67 0% 0% 2% 100%
Python 3 5.54 262,360 800 5.53 1% 1% 1% 100%
pidigits
source secs KB gz cpu cpu load
PHP 0.15 ? 394 0.13 0% 0% 0% 100%
  No program contribute your program
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

Python 3

Python 3.5.0 (default, Sep 14 2015, 09:36:50) [GCC 4.9.2] on linux