| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | private function extractStrings($str) { |
||
| 19 | $pos = 0; |
||
| 20 | $num = 0; |
||
| 21 | $strings = []; |
||
| 22 | while (($pos = strpos($str, '"', $pos+1)) !== false) { |
||
| 23 | $end = strpos($str, '"', $pos+1); |
||
| 24 | while ($str[$end-1] == '\\') $end = strpos($str, '"', $end+1); |
||
| 25 | $strings['$+STR' . ++$num] = substr($str, $pos, $end-$pos+1); |
||
| 26 | $str = substr_replace($str, '$+STR' . $num, $pos, $end-$pos+1); |
||
| 27 | } |
||
| 28 | |||
| 29 | return [$str, $strings]; |
||
| 30 | } |
||
| 31 | |||
| 39 | } |