3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "INVOICE=123456:STATUS=PAID:PAY_TIME=20150525233333:STAN=123456:BCODE=ddd123 INVOICE=123457:STATUS=EXPIRED INVOICE=123458:STATUS=DENIED"; $lines = explode("\n", $text); foreach ($lines as $line) { if (preg_match_all('/(.+)=(.+?)/', $line, $matches)) { print_r($matches); } }

preferences:
30.88 ms | 402 KiB | 5 Q