@@ 181-189 (lines=9) @@ | ||
178 | } |
|
179 | } |
|
180 | if ( !$in_func ) continue; |
|
181 | if ( '(' == $token ) { |
|
182 | $paren_level++; |
|
183 | if ( 0 == $paren_level ) { // start of first argument |
|
184 | $just_got_into_func = false; |
|
185 | $current_argument = null; |
|
186 | $current_argument_is_just_literal = true; |
|
187 | } |
|
188 | continue; |
|
189 | } |
|
190 | if ( $just_got_into_func ) { |
|
191 | // there wasn't a opening paren just after the function name -- this means it is not a function |
|
192 | $in_func = false; |
|
@@ 206-211 (lines=6) @@ | ||
203 | $paren_level--; |
|
204 | continue; |
|
205 | } |
|
206 | if ( ',' == $token && 0 == $paren_level ) { |
|
207 | $args[] = $current_argument; |
|
208 | $current_argument = null; |
|
209 | $current_argument_is_just_literal = true; |
|
210 | continue; |
|
211 | } |
|
212 | if ( T_CONSTANT_ENCAPSED_STRING == $id && $current_argument_is_just_literal ) { |
|
213 | // we can use eval safely, because we are sure $text is just a string literal |
|
214 | eval('$current_argument = '.$text.';' ); |