Compatibility

From PhalangerWiki

Jump to: navigation, search

Phalanger is compatible with full range of PHP applications. Since every version of PHP is specific in some way and PHP applications are using these differences; Phalanger is being tested with latest versions of many opensource and commercial PHP applications to achieve better compatibility and fix application-specific issues.

Because Phalanger compiles the whole source code of PHP application, it usually finds a few hidden syntactic or semantic errors. These must be fixed first.

For more examples of single Phalanger usages and its possibilities, please see Code samples.

PHP features in progress

Following table lists known PHP features that are currently not fully supported on Phalanger.

Feature Development state
SPL In development
PHP Reflection In development
PDO In development
PHP 5.3 Late static binding Supported
PHP 5.3 Closures & Anonymous functions Supported
PHP 5.3 indirect class usage Supported
PHP 5.4 Closures rebinding Unsupported
PHP 5.4 new callbacks option Supported
PHP 5.4 Traits In parser, cannot be compiled yet
PHP 5.4 improved Array syntax Supported
Tokenizer Supported (ID of tokens does not match yet)
PHP Namespaces Supported
PHP Sessions Supported, limited in ASP.NET (default) mode
PHP 5.5 language features In development

Extensions

Phalanger supports both, native PHP4 extensions and their updated managed reimplementation into .NET. Managed extensions are always preferred, since they allow to run 64bit, they are faster and safe.

Missing managed extensions can be implemented, if it is required. Proprietary extensions are available as a part of support plans.

Note native extensions don't run on Mono/Linux, since they are compiled for Win32 platform. The only way is to use managed extensions here.

Extension Bundled as native Managed reimpementation
bcmath yes no
big_int yes no
bz2 yes no
calendar yes no
com yes no
Core no yes
cpdf yes no
crack yes no
ctype no yes
curl yes yes http/https
date no yes
db yes no
dba yes no
dbase yes no
dbx yes no
dom no yes
domxml yes yes
ereg no yes
exif yes yes
fileinfo (PHP5) yes no
filepro yes no
filter no yes
ftp yes no
gd2 yes yes
gettext yes in progress
hash no yes
hyperwave yes no
iconv yes yes
image yes yes
imap yes no
interbase yes no
java yes no
json no yes
ldap yes no
libxml no yes
mbstring yes in progress
mcrypt yes no
memcached no yes, proprietary
mhash yes no
mime_magic.dl yes no
ming yes no
msql yes no
mssql yes yes
mysql yes yes
odbc yes no
openssl yes no
pcre no yes
pdf yes no
pgsql yes no
PDO no yes (in progress)
printer yes no
Reflection no yes (in progress)
shmop yes no
snmp yes no
session no yes
sockets yes no
SOAP no yes SoapClient
SPL no yes
SimpleXML no yes
standard no yes
tokenizer no yes
xml yes yes
xmlrpc yes no
xsl no yes
xslt yes no
yaz yes no
zip yes yes
zlib yes yes