Page 1 of 1

How to compile php script to .net class using phpc ...

PostPosted: January 15th, 2014, 5:53 am
by nexialist
Hi,
I just want to know how to compile a php code to .net dll using the command line: phpc myclass.php /target:dll /pure+
but without appending [\Export] in the class code:

[\Export]
class myClass
{
public function f()
{
return "Hello World";
}
}

I don't want to append [\Export] because it is very tiresome. I have a lot of php classes to compile to .net dlls . please help.

Re: How to compile php script to .net class using phpc ...

PostPosted: January 18th, 2014, 9:50 am
by Jakub Misek
You can place
Code: Select all
[assembly: Export]
above some class and it will export all the classes.

Re: How to compile php script to .net class using phpc ...

PostPosted: January 19th, 2014, 3:26 am
by nexialist
Jakub Misek, Thanks a lot!!