How to parse PHP string containing multiple PHP blocks?

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

How to parse PHP string containing multiple PHP blocks?

Postby Piedone » October 12th, 2012, 8:20 pm

Hi!

I'd like to dynamically run a PHP script that exists in a string. This script is like a view, so it contains multiple PHP blocks inside the PHP tags. This won't work with Eval() and IncludeScript is no option for me as the script is not in a physical file (and I can't write it out to one).

Could you help me how this is possible?

Thank you in advance.
Piedone
 
Posts: 11
Joined: October 12th, 2012, 7:30 pm

Re: How to parse PHP string containing multiple PHP blocks?

Postby dbuerer » September 10th, 2013, 2:13 am

can you post an example of what you mean?
dbuerer
 
Posts: 7
Joined: September 5th, 2013, 3:24 pm

Re: How to parse PHP string containing multiple PHP blocks?

Postby Piedone » September 10th, 2013, 10:19 am

Wow that was a long time ago :-).

What I meant was the the ability to parse a string with PHP code that contains multiple PHP blocks like this:

<?php
blabla
?>
...
<?php
blabla
?>
Piedone
 
Posts: 11
Joined: October 12th, 2012, 7:30 pm


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 8 guests

cron

User Control Panel

Login

Who is online

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