Page 1 of 1

Compiler directives / options

PostPosted: November 5th, 2013, 8:54 pm
by mlavinder
Are there any compiler directives or such that can be added that will tell the Phalanger to skip lines during compile but will still be seen by the PHP interpreter?

I have a customer PHP Library I would like to convert but there's a lot of code I won't need (requires and such). Looking for a way to skip those lines without having to comment or remove them all. A way to do this would be a nice feature.

Re: Compiler directives / options

PostPosted: November 5th, 2013, 10:51 pm
by Jakub Misek
Hi,

following snippet
Code: Select all
if (!defined("PHALANGER")) {
...
}
works in general. Moreover this is recognized by compiler, and will be evaluated in compile time, so it has no performance drawbacks.