Articles

Base configuration for PHP 5.2.3

  • Ecrit par Damien Seguy
Image pour le titre du contenu

Vous lisez une vieille version : ce document dispose d'une version plus récente : Base configuration for PHP 5.2.5

Ce document est aussi disponible en français fr 


Since PHP 5.2.3 has been published, over 9700 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 thoeries...

From this study, PHP architectures have from 5 to 61 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 61.

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.3 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.

date100.00 %PECL ext
standard100.00 %Other extension
pcre100.00 %PECL ext
session99.72 %PECL ext
Reflection99.66 %PECL ext
SPL99.27 %PHP standard
hash99.17 %PHP standard
filter99.06 %PHP standard
libxml99.05 %PECL ext
ctype99.04 %PECL ext
json99.00 %PHP standard
tokenizer98.94 %PECL ext
xml98.84 %PECL ext
iconv98.64 %PECL ext
SimpleXML98.57 %PECL ext
posix98.42 %PECL ext
xmlreader97.89 %PHP standard
xmlwriter97.87 %PHP standard
dom97.81 %PECL ext
PDO97.29 %PHP standard
pdo_sqlite96.10 %PHP standard
SQLite93.89 %PHP standard
mysql61.87 %PHP standard
zlib50.42 %PECL ext
gd43.04 %PECL ext
mbstring35.32 %PECL ext
ftp25.85 %PECL ext
openssl24.71 %PECL ext
curl23.45 %PECL ext
sockets21.51 %PECL ext
gettext20.86 %PECL ext
exif16.56 %PECL ext
calendar16.30 %PECL ext
mysqli14.66 %PECL ext
bcmath13.80 %Other extension
mcrypt13.50 %PECL ext
bz212.99 %PHP standard
pgsql11.89 %PECL ext
soap10.56 %PECL ext
sysvsem7.99 %Other extension
sysvshm7.99 %Other extension
wddx7.62 %PECL ext
xsl7.51 %PECL ext
mhash7.51 %PECL ext
dba7.01 %PECL ext
imap6.84 %PECL ext
ldap6.83 %PECL ext
shmop5.95 %PECL ext
pdo_mysql5.73 %PHP standard
zip5.48 %PHP standard
mime_magic4.94 %PECL ext
gmp4.85 %PECL ext
xmlrpc4.75 %PECL ext
sysvmsg3.98 %Other extension
pspell3.79 %PECL ext
dbase3.72 %PECL ext
pcntl3.43 %PECL ext
ncurses2.89 %PHP standard
mssql2.40 %PECL ext
pdo_pgsql2.24 %PHP standard
readline2.09 %PECL ext
snmp1.85 %PECL ext
odbc1.78 %PECL ext
tidy1.55 %PHP standard
apc1.05 %PHP standard
memcache0.76 %PHP standard
ming0.61 %PECL ext
eAccelerator0.52 %Other extension
ionCube Loader0.47 %Other extension
XCache0.42 %Other extension
sybase0.34 %PECL ext
pdf0.32 %PECL ext
fileinfo0.31 %PHP standard
xdebug0.29 %PHP standard
magickwand0.28 %Other extension
suhosin0.22 %Other extension
http0.18 %PECL ext
sybase_ct0.16 %Other extension
imagick0.14 %PHP standard
ffmpeg0.13 %Other extension
interbase0.13 %Other extension
pdo_dblib0.13 %PHP standard
crack0.12 %PHP standard
com_dotnet0.11 %PECL ext
jobqueue_client0.09 %Other extension
wsf0.08 %Other extension
radius0.08 %PHP standard
uploadprogress0.08 %PHP standard
ssh20.08 %PHP standard
PDO_OCI0.07 %PHP standard
geoip0.07 %PHP standard
runkit0.07 %PHP standard
simplate0.06 %Other extension
swishe0.06 %Other extension
recode0.05 %PECL ext
lzf0.05 %PHP standard
mailparse0.05 %PHP standard
PDO_Firebird0.05 %PECL ext
yaz0.05 %PHP standard
java0.05 %PECL ext
MapScript0.05 %Other extension
pdo_informix0.04 %PHP standard
ADOdb0.04 %Other extension
fdf0.04 %PECL ext
adv_ini0.04 %Other extension
APD0.04 %PHP standard
mnogosearch0.04 %PHP standard
svn0.03 %PHP standard
rrdtool0.03 %Other extension
gnupg0.03 %PHP standard
php_dumper0.03 %Other extension
dbg0.03 %Other extension
amf0.02 %Other extension
fribidi0.02 %PHP standard
kakapo0.02 %Other extension
pfpro0.02 %PECL ext
daumauth0.02 %Other extension
chinapay0.02 %Other extension
xdiff0.02 %PHP standard
syck0.02 %PHP standard
namazu0.02 %PHP standard
stats0.01 %PHP standard
ps0.01 %PHP standard
sdo0.01 %Other extension
timezonedb0.01 %PHP standard
PHPPROJ0.01 %Other extension
id30.01 %PHP standard
rar0.01 %PHP standard
kakasi0.01 %Other extension
sql_relay0.01 %Other extension
face_detect0.01 %Other extension
spread0.01 %PHP standard
Xaira0.01 %Other extension
file_get_contents_compress0.01 %Other extension
VersyPDF0.01 %Other extension
KOSHIAN0.01 %Other extension
ogr0.01 %Other extension
translit0.01 %PHP standard
perl0.01 %PHP standard
yats0.01 %Other extension
msql0.01 %PECL ext
ChartDirector PHP API0.01 %Other extension
idn0.01 %PHP standard
flexis0.01 %Other extension
vld0.01 %PHP standard
cybersource0.01 %Other extension
mod_cluster0.01 %Other extension
PostgreSQL0.01 %Other extension
mecab0.01 %Other extension
dio0.01 %PHP standard
ivan_test0.01 %Other extension
odbtp0.01 %PHP standard
ibm_db20.01 %PHP standard
oci80.01 %PECL ext
dbx0.01 %PHP standard

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

Commentaires

Vous pouvez ajouter votre commentaire!


Vous devez vous connecter pour commenter