We have had an app sitting around which was written in PHP and runs on Phalanger. As a result, we integrated some .NET element into it. However, how we seem to be suffering of issues caused by the .NET assemblies as it can no longer recognize them after updating to the latest version. If we downgrade the version to about a year ago, it works fine. However we would like to be able to use the .NET assemblies with the latest version. An example of something that causes issues is:
$sections = new System\Collections\Generic\List<:string:>;
the compiler complains that:
CompileError (2014): Syntax error: unexpected token 'List'
Does anyone have any ideas who is using the latest version of Phalanger?
'List' is PHP keyword, and it is not valid PHP identifier. However, Phalanger has additional configuration option, which allows to use such keywords in identifiers.
Add following into your .config file:
<phpNet><compiler><set name="LanguageFeatures"><add value="CSharpTypeNames" />
This allows compiler to treat disallowed PHP keywords as identifier.