"Compiling" content with short tags to var, without eval()

Posted by Spot on Stack Overflow See other posts from Stack Overflow or by Spot
Published on 2010-05-03T15:20:11Z Indexed on 2010/05/03 15:28 UTC
Read the original article Hit count: 258

Filed under:
|
|

To start off, let me clear the air by saying we are aware of the dis/advantages to using short tag syntax in PHP. That is not what this question is about.

Is there a way to "include" a file containing short tag code, into a variable, and have PHP actually parse the code?

include/require obviously do not provide the data in a workable form, and output buffering does not parse the short tag code because it happens at runtime.

Using eval() is simply not an option.

Suggestions?

© Stack Overflow or respective owner

Related posts about php

Related posts about shorttags