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

Integrating PHP and C# together. Using .NET libraries from PHP and vice versa.

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

Postby nexialist » January 15th, 2014, 5:53 am

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.
nexialist
 
Posts: 4
Joined: January 15th, 2014, 5:32 am

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

Postby Jakub Misek » January 18th, 2014, 9:50 am

You can place
Code: Select all
[assembly: Export]
above some class and it will export all the classes.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

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

Postby nexialist » January 19th, 2014, 3:26 am

Jakub Misek, Thanks a lot!!
nexialist
 
Posts: 4
Joined: January 15th, 2014, 5:32 am


Return to PHP/C# interoperability

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 2 guests