Articles

Base configuration for PHP 5.2.5

  • Ecrit par Damien Seguy
  • lundi 28 janvier 2008
Image pour le titre du contenu

Ce document est aussi disponible en français fr 


Since PHP 5.2.5 has been published, over 8500 tests were sent to the Quality Assurance Team. In those tests reports, we can find the list of failed tests, and an anonymous PHPinfo(), that helps the PHP team to understand the origin of the errors. With such a number of phpinfo(), it is tempting to get some stats about compilation choices.

Attention : thos statistics are based on the report sent to PHP.net. There is no proof they are representative of the usual PHP usage, may it be on the Web or as CLI. The only credibility here lies in the high number of processed phpinfo(). That, and some math theories...

From this study, PHP architectures have from 5 to 62 extensions. The most popular configuration havent 23 extensions, and rarely less. Then, probability lowers as more extensions are being used. The maximum number of PHP extension tested at the same time is currently 62.

Standard configuration


 The standard configuration is the list of PHP extension that are almost certainly on any given PHP binary.

The only one that is universally present is called 'standard' : if you can't find it, you're probably not using PHP.

Date and pcre are also compulsory in PHP 5.2.5 and you 'll have them always handy. Sessions and reflection are close to be universal,  though not exactly : this is were we can see that both Web and CLI test reports are being send to php.net.



Popular extensions

This list are the popular extensions : the one you may bet on, but may also be absent. Some of those extension are definitely on the raise, like json or mysqli, while some are loosing ground, like mysql. There is a noticeable gap between those extension and the standard one : sqlite, the lowest from standard group, is still in over 90% of PHP binaries. mysql, the highest of the popular extensions, is showing 65% of presence. All in all, MySQL is present in 85% of binaries, close to a standard extension (mysqli + mysql).


The rare extensions

The last group of extension are the rare one : they never go beyond 10%. They usually require some extra work to have them working with PHP, may it be compiling an external library, downloading the driver from PECL or the editor's site, or even working on the code. Whenever your application is relying on one of those extension, your users may find it hard to have it hosted.

A large share of the below extensions are in PECL, while the others are on specific sites. This is a fun graph, to discover new extensions.





All extensions
And here is the full graph, and below, the tabulated details of every PHP extensions.




All links link to PHP manual, PECL web site or a search on Google.

standard100.00 %Other extension
date100.00 %PECL ext
pcre100.00 %PECL ext
Reflection99.73 %PECL ext
session99.64 %PECL ext
SPL99.40 %PHP standard
ctype99.24 %PECL ext
hash99.24 %PHP standard
filter99.17 %PHP standard
tokenizer99.03 %PECL ext
libxml99.02 %PECL ext
json98.87 %PHP standard
xml98.80 %PECL ext
SimpleXML98.53 %PECL ext
posix98.46 %PECL ext
xmlwriter97.70 %PHP standard
dom97.70 %PECL ext
iconv97.67 %PECL ext
xmlreader97.61 %PHP standard
PDO97.03 %PHP standard
pdo_sqlite95.75 %PHP standard
SQLite94.05 %PHP standard
mysql61.01 %PHP standard
zlib46.35 %PECL ext
gd41.35 %PECL ext
mbstring34.57 %PECL ext
openssl24.19 %PECL ext
ftp23.94 %PECL ext
curl21.34 %PECL ext
sockets20.61 %PECL ext
gettext18.57 %PECL ext
exif15.66 %PECL ext
calendar14.50 %PECL ext
mysqli13.61 %PECL ext
mcrypt13.01 %PECL ext
bz211.99 %PHP standard
bcmath11.76 %Other extension
pgsql11.23 %PECL ext
soap11.20 %PECL ext
xsl8.08 %PECL ext
sysvshm7.30 %Other extension
sysvsem7.28 %Other extension
ldap6.78 %PECL ext
wddx6.64 %PECL ext
dba6.63 %PECL ext
zip6.55 %PHP standard
imap6.25 %PECL ext
pdo_mysql6.03 %PHP standard
mhash5.95 %PECL ext
xmlrpc5.70 %PECL ext
shmop5.11 %PECL ext
mime_magic4.11 %PECL ext
sysvmsg3.93 %Other extension
gmp3.73 %PECL ext
pspell2.83 %PECL ext
dbase2.68 %PECL ext
pcntl2.61 %PECL ext
ncurses2.39 %PHP standard
odbc2.18 %PECL ext
tidy2.09 %PHP standard
pdo_pgsql2.07 %PHP standard
mssql2.03 %PECL ext
readline1.96 %PECL ext
snmp1.92 %PECL ext
apc1.04 %PHP standard
memcache0.83 %PHP standard
ionCube Loader0.65 %Other extension
ming0.51 %PECL ext
imagick0.43 %PHP standard
sybase0.39 %PECL ext
XCache0.39 %Other extension
xdebug0.34 %PHP standard
pdo_dblib0.28 %PHP standard
eAccelerator0.25 %Other extension
suhosin0.21 %Other extension
fileinfo0.20 %PHP standard
pdf0.20 %PECL ext
magickwand0.18 %Other extension
sybase_ct0.17 %Other extension
recode0.15 %PECL ext
uploadprogress0.15 %PHP standard
interbase0.15 %Other extension
http0.14 %PECL ext
mailparse0.13 %PHP standard
PDO_OCI0.10 %PHP standard
rrdtool0.09 %Other extension
gnupg0.08 %PHP standard
APD0.08 %PHP standard
ffmpeg0.08 %Other extension
oci80.07 %PECL ext
swishe0.07 %Other extension
pdo_informix0.07 %PHP standard
ssh20.06 %PHP standard
fbsql0.06 %Other extension
msql0.05 %PECL ext
java0.05 %PECL ext
geoip0.05 %PHP standard
xdiff0.05 %PHP standard
mnogosearch0.03 %PHP standard
crack0.03 %PHP standard
radius0.03 %PHP standard
ADOdb0.03 %Other extension
simplate0.03 %Other extension
syck0.02 %PHP standard
com_dotnet0.02 %PECL ext
namazu0.02 %PHP standard
sina0.02 %Other extension
yaz0.02 %PHP standard
bcompiler0.02 %PHP standard
dbx0.02 %PHP standard
jobqueue_client0.02 %Other extension
PostgreSQL0.02 %Other extension
perl0.01 %PHP standard
pam_auth0.01 %Other extension
parsekit0.01 %PHP standard
shp0.01 %Other extension
tclink0.01 %PHP standard
amf0.01 %Other extension
blitz0.01 %Other extension
PDO_ODBC0.01 %PHP standard
qr0.01 %Other extension
timezonedb0.01 %PHP standard
rar0.01 %PHP standard
db40.01 %Other extension
lzf0.01 %PHP standard
kakasi0.01 %Other extension
fdf0.01 %PECL ext
lpcapi0.01 %Other extension
idn0.01 %PHP standard
runkit0.01 %PHP standard
Phar0.01 %PHP standard
htscanner0.01 %PHP standard
wires_php0.01 %Other extension
PDO_Firebird0.01 %PECL ext
expect0.01 %PHP standard
stats0.01 %PHP standard
dio0.01 %PHP standard
ruten0.01 %Other extension
id30.01 %PHP standard
mod_cluster0.01 %Other extension
sql_relay0.01 %Other extension
mdaddrPHP module0.01 %Other extension
SQLITE30.01 %Other extension
mecab0.01 %Other extension
myfunctions0.01 %Other extension
fann0.01 %PHP standard
svn0.01 %PHP standard
ps0.01 %PHP standard
sign0.01 %Other extension
SourceGuardian0.01 %Other extension

Take note :
  • There are configuration directives shown in the test report, though it is my understanding that they will change between compilation and production. They are not reliable enough to make any stats, like we did with the 2006 phpinfo() study. Extension, on the other hand, are there to stay.
  • It is possible to get some more information from the tests reports about static aspects of PHP binaries (libraries versions, helpers, etc). If you want other insight, feel free to drop me a note
< Précédent   Suivant >

Commentaires

Vous pouvez ajouter votre commentaire!


Vous devez vous connecter pour commenter