About Jakub Míšek

Jakub graduated Software Engineering at Faculty of Mathematics and Physics at Charles University in Prague, Czech Republic. His academic work involved data semantization, compilers, integration and automatized processing of web data and utilizing of development processes in dynamic languages. Beside other things, Jakub is developer of open-source PHP language compiler called Phalanger.

Phalanger 4.0

After the long break we are happy to announce progress on Phalanger and the new version 4.0. There are some major changes in functionality and planned changes in Phalanger API. Following blog post should summarize them and describe Phalanger 4.0 advantages and improvements.

Continue reading

Phalanger 3.0 updates for March 2012

On February 2012, Phalanger – the PHP compiler for .NET – got a lot of new features, fixes and optimizations. You can see the full list of changes (still growing) at phalanger.codeplex.com. The most noticeable change is the performance of accessing PHP arrays and overall performance compared to previous versions and standard PHP itself!

Writing compiled PHP extensions in PHP

PHP offers a lot of various extensions which add additional library functions, classes, constants and other constructs. Common extensions include for example php_mysql and php_iconv. Since extensions are implemented in C language, the performance is great. It also allows programmers to use other native libraries that are not available in PHP. However there is one big disadvantage; writing such extensions is not easy. C code is harder to maintain, it requires learning lower-level language and it is easier to make mistakes that lead to program failures that are hard to handle.

Continue reading

“dynamic” keyword and PHP objects

We’ve already demonstrated, how to use PHP scripts from within a .NET application using Phalanger. For reference you can take a look at PHP as a scripting language for C# article or Standard mode interoperability tutorial. In this way we can take an existing PHP web or a library, load them into C# context and reuse their functions, classes, constants or global variables. In addition we can even define new functions and classes in C# and inject them into PHP, so the code in PHP seamlessly uses these declarations as they would be declared in PHP too.

EDIT: Phalanger 3.0 removes all the limitations mentioned below. Continue reading

PHP as a scripting language for C#

When creating .NET applications (including desktop and web applications), it may be useful to allow extending the application using some scripting language. The users of the application can write simple scripts to configure the application, modify how data is presented or write simple add-ins. In this article, we look how to use PHP as a scripting language. Continue reading