Can any body help to split php source code

Posted by joe-on-wp on Stack Overflow See other posts from Stack Overflow or by joe-on-wp
Published on 2010-03-14T02:00:14Z Indexed on 2010/03/14 2:05 UTC
Read the original article Hit count: 297

Filed under:
|
|
|
|

hi, can any body help me on separating this example of data that i need to parse and seperate text just like PHPDoc. It is PHP source code.

The example string :

function one_to_tree() {
        //bla bla bla   
    return FALSE;
}


function two_to_tree() {
        //bla bla bla   
    return FALSE;
}


function three_to_tree() {

       if ($sample){ //bla bla bla   } 
    return FALSE;
}

can anybody help me how to seperate above string based on "function" word and create and array. Thank you

© Stack Overflow or respective owner

Related posts about phpdoc

Related posts about regex