| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function match($openChr, $closingChr, $start = 0) { |
||
| 18 | $open = strpos($this->str, $openChr, $start); |
||
| 19 | $close = strpos($this->str, $closingChr, $open); |
||
| 20 | |||
| 21 | $cPos = $open+1; |
||
| 22 | while (($cPos = strpos($this->str, $openChr, $cPos+1)) !== false && $cPos < $close) $close = strpos($this->str, $closingChr, $close+1); |
||
| 23 | |||
| 24 | $this->startPos = $open; |
||
| 25 | $this->endPos = $close; |
||
| 26 | return substr($this->str, $open+1, $close-$open-1); |
||
| 27 | } |
||
| 28 | |||
| 36 | } |