I found 2 good IRC presentations about Phalanger (PHP.NET compiler) [by zaemis] and SPL (Standard PHP Library) [by Davy Shafik]. check PHP.ThinkTank .

Phalanger: the presentation was about some very basics of how .NET works and how we can include a .NET assemblies in our normal PHP code and use it and how you can write PHP applications in the .NET way using Phalanger.
there were some Java guys said that they will say goodbye Java and move to .NET .. lol . they liked the idea of how you can write assemblies in C# for example and then consuming it in their PHP.NET code. I like this too.
zaemis gave a basic example on how you can create a simple form (it’s a Desktop one this time) and get some data from a MySQL database and display it in a data grid. if you are already a PHP developer, after seeing his code , you will feel  home :-). the code looks like a normal PHP code except the first lines where he is importing the required namespaces. notice the triple colons. till now there is no namespaces support in the normal PHP but what I remember is that it will be added in PHP6.

notice that in PHP.NET you are still writing your lovely dynamic code. you can see this too in IronPython. (hell on static typing)

SPL: Davey gave a nice presentation about the basics of SPL. he talked about the Iterator interface, IteratorAggregate, ArrayObject , ArrayAccess , RecursiveIteratorIterator and dynamic properties.
what I like here more is the ArrayAccess interface. by implementing this interface in your class , you can create an instance of this class and save it in a variable for example called $Obj . then use this object like a normal array as you will be allowed of doing things like
$Obj['foo'] = ‘bar’ ; //and
print $Obj['foo'] ; // this results of printing ‘bar’

this is the same like using indexers in C#. but remember that you still can’t iterate on this object using foreach f.e. else if you are implementing an iterator interface.

No related posts.