Phalanger is a
compiler front end
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
for
compiling
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
PHP
PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
source code into
CIL byte-code, which can be further processed by the
.NET Framework
The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
's
just-in-time compiler. The project was started at
Charles University
)
, image_name = Carolinum_Logo.svg
, image_size = 200px
, established =
, type = Public, Ancient
, budget = 8.9 billion CZK
, rector = Milena Králíčková
, faculty = 4,057
, administrative_staff = 4,026
, students = 51,438
, underg ...
and is supported by
Microsoft
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
. Phalanger was discontinued in favor of the more modern
PeachPie compiler, which utilizes the
Roslyn API.
Compatibility
Phalanger can run real-world PHP applications, many with minor to no modifications. Examples include
WordPress
WordPress (WP or WordPress.org) is a free and open-source software, free and open-source content management system (CMS) written in PHP, hypertext preprocessor language and paired with a MySQL or MariaDB database with supported secure hypert ...
,
phpMyAdmin
phpMyAdmin is a free and open source administration tool for MySQL and MariaDB. As a portable web application written primarily in PHP, it has become one of the most popular MySQL administration tools, especially for web hosting services.
His ...
and
phpBB
phpBB is an Internet forum package written in the PHP scripting language. The name "phpBB" is an abbreviation of ''PHP Bulletin Board''. Available under the GNU General Public License, phpBB is free and open-source.
Features of phpBB includ ...
.
Performance
One of the main goals of the project is to improve performance of
PHP
PHP is a General-purpose programming language, general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementati ...
applications. The project web page claims considerable performance benefits over a 32-bit Windows version of PHP.
There was a project at Charles University to re-implement the Phalanger core using the Microsoft
Dynamic Language Runtime
The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:
* A dynamic type system, to be shared by all languages usi ...
(DLR), and to develop a
Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms such ...
integration tool to provide
IntelliSense
Intelligent code completion is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes. Attempts at this are usually done through auto-c ...
for the PHP language.
Though some features from DLR would slow down the performance of Phalanger, they do claim performance gains by a factor of 6. These features are being integrated into current Phalanger core.
Google Summer of Code
A project involving Phalanger was mentored by the
Mono
Mono may refer to:
Common meanings
* Infectious mononucleosis, "the kissing disease"
* Monaural, monophonic sound reproduction, often shortened to mono
* Mono-, a numerical prefix representing anything single
Music Performers
* Mono (Japanese ...
team during the
Google Summer of Code
The Google Summer of Code, often abbreviated to GSoC, is an international annual program in which Google awards stipends to contributors who successfully complete a free and open-source software coding project during the summer. , the program is ...
program in 2008. During this period Phalanger was ported to the Silverlight 2.0 framework with the goal of making it work on Moonlight as well.
Jadu sponsorship
Early in 2008, UK Content Management vendor
Jadu partnered with the Prague-based team to improve communication between .NET and the Phalanger compiler. It is based on
duck typing
Duck typing in computer programming is an application of the duck test—"If it walks like a duck and it quacks like a duck, then it must be a duck"—to determine whether an object can be used for a particular purpose. With nominative t ...
and provides a way for accessing objects from the dynamic PHP world that lack compile-time type information from a statically typed language in a .NET environment in a type-safe way.
In December 2008, Jadu announced that it has made the compiler available to the developer community and in interviews with ITPRO and VNUnet said that the development would help close the skills gap between PHP and .NET.
Devsense support & development
Since 2009, DEVSENSE company leads the development of the project and offers commercial support. DEVSENSE consists of core Phalanger developers and keeps this open-source project alive.
In addition to maintenance and growth of the project, Devsense is providing Visual Studio integration of Phalanger for the community.
Since 2012, DEVSENSE provides support forum for Phalanger (compiler) and related projects for the community.
Legacy
The last PHP version supported by Phalanger is 5.4. The GitHub project is marked "Deprecated" and (as of 2019) it hasn't been updated for years. The GitHub page also announces a new project, ''
PeachPie'' compiler as its successor for PHP 7.1. ''PeachPie'' can compile code using PHP 5.4 syntax or newer, and is officially supported by
.NET Foundation
The .NET Foundation is an organization incorporated on March 31, 2014, by Microsoft to improve open-source software development and collaboration around the .NET Framework. It was launched at the annual Build 2014 conference held by Microsoft. T ...
.
See also
*
PeachPie
*
HHVM
HipHop Virtual Machine (HHVM) is an open-source virtual machine based on just-in-time (JIT) compilation that serves as an execution engine for the Hack programming language and used to support PHP execution before the release of HHVM version ...
References
External links
Phalanger PHP compiler blogPhalanger discussion forumPhalanger commercial supportPhalanger source control and issue trackerOfficial Web Page for previous version 1.0eWeek article about PhalangerMicrosoft accommodates dynamic languages (article)Channel 9 Phalanger
{{Common Language Infrastructure
.NET programming tools
PHP software
WordPress