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

Re: Compiler directives / options

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

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


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 13 guests

cron

User Control Panel

Login

Who is online

In total there are 13 users online :: 0 registered, 0 hidden and 13 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 13 guests