3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $res = 'RESULT: OK RESULT_PS: FINISHED RESULT_CODE: 000 3DSECURE: NOTPARTICIPATED RRN: 332216778155 APPROVAL_CODE: 527628 CARD_NUMBER: 5***********8817 MRCH_TRANSACTION_ID: 178'; preg_match( '/RESULT: ([A-Z]+) RESULT_PS: ([A-Z]+) RESULT_CODE: ([0-9]+) 3DSECURE: ([A-Z]+) RRN: ([0-9]+) APPROVAL_CODE: ([0-9]+) CARD_NUMBER: ([0-9\*]+) MRCH_TRANSACTION_ID: ([0-9]+)/i', $res, $result); print_r($result);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => RESULT: OK RESULT_PS: FINISHED RESULT_CODE: 000 3DSECURE: NOTPARTICIPATED RRN: 332216778155 APPROVAL_CODE: 527628 CARD_NUMBER: 5***********8817 MRCH_TRANSACTION_ID: 178 [1] => OK [2] => FINISHED [3] => 000 [4] => NOTPARTICIPATED [5] => 332216778155 [6] => 527628 [7] => 5***********8817 [8] => 178 )