Compiler directives / options

Discussion about the open-source Phalanger [?] project.

Compiler directives / options

Postby mlavinder » November 5th, 2013, 8:54 pm

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.
Posts: 3
Joined: November 5th, 2013, 5:50 pm

Re: Compiler directives / options

Postby Jakub Misek » November 5th, 2013, 10:51 pm


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.
Jakub Misek │ DEVSENSE s.r.o. |
User avatar
Jakub Misek
Posts: 2085
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 2 guests


User Control Panel


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 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 2 guests