3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function set_convert_info($file, $country, $test) { // test if ((int)str_replace('TP', '', $test) === 1) { echo "TEST TRUE\n"; } // country echo strtoupper($country) . "\n"; // file info $has_file_info = preg_match( '/^F(ASF|LBF)?X(.+)$/', $file, $file_info ); echo "FILE INFO: " . (string)$has_file_info . "\n"; } parse_str('transaction_subject=Plus Monthly Subscription&payment_date=04:39:40 Nov 20, 2015 PST&txn_type=subscr_payment&subscr_id=I-4GXT1TST7VUF&last_name=hakki&residence_country=AU&item_name=Plus Monthly Subscription&payment_gross=2.99&mc_currency=USD&business=payment@mobile9.com&payment_type=instant&protection_eligibility=Partially Eligible - Unauth Only&verify_sign=Anh.d8D9aiz0KVpGadUtN89QFkgKAq.xzmf0vOAE3LuVPvWFJ0FKiTvI&payer_status=verified&payer_email=underthecovers@iinet.net.au&txn_id=58P89968DA177754R&receiver_email=payment@mobile9.com&first_name=amanda&payer_id=AMETCW2ENDZGU&receiver_id=HNFJ3VJEEY4SA&item_number=MM|977383&payment_status=Completed&payment_fee=0.43&mc_fee=0.43&mc_gross=2.99&charset=windows-1252&notify_version=3.8&ipn_track_id=2a5002329ba04', $str); $item = explode('|', $str['item_number']); list($type, $payment_id, $convert_type, $medium, $geo, $file, $test) = $item; set_convert_info($file, $geo, $test); echo "\n\n"; ksort($str); foreach ($str as $key => $value) { echo $key . ': ' . $value . "\n"; }
based on vQ9hL
Output for 7.0.0 - 7.3.1
Notice: Undefined offset: 2 in /in/RVUk5 on line 25 Notice: Undefined offset: 3 in /in/RVUk5 on line 25 Notice: Undefined offset: 4 in /in/RVUk5 on line 25 Notice: Undefined offset: 5 in /in/RVUk5 on line 25 Notice: Undefined offset: 6 in /in/RVUk5 on line 25 FILE INFO: 0 business: payment@mobile9.com charset: windows-1252 first_name: amanda ipn_track_id: 2a5002329ba04 item_name: Plus Monthly Subscription item_number: MM|977383 last_name: hakki mc_currency: USD mc_fee: 0.43 mc_gross: 2.99 notify_version: 3.8 payer_email: underthecovers@iinet.net.au payer_id: AMETCW2ENDZGU payer_status: verified payment_date: 04:39:40 Nov 20, 2015 PST payment_fee: 0.43 payment_gross: 2.99 payment_status: Completed payment_type: instant protection_eligibility: Partially Eligible - Unauth Only receiver_email: payment@mobile9.com receiver_id: HNFJ3VJEEY4SA residence_country: AU subscr_id: I-4GXT1TST7VUF transaction_subject: Plus Monthly Subscription txn_id: 58P89968DA177754R txn_type: subscr_payment verify_sign: Anh.d8D9aiz0KVpGadUtN89QFkgKAq.xzmf0vOAE3LuVPvWFJ0FKiTvI
Output for 5.3.20 - 5.6.28
Notice: Undefined offset: 6 in /in/RVUk5 on line 25 Notice: Undefined offset: 5 in /in/RVUk5 on line 25 Notice: Undefined offset: 4 in /in/RVUk5 on line 25 Notice: Undefined offset: 3 in /in/RVUk5 on line 25 Notice: Undefined offset: 2 in /in/RVUk5 on line 25 FILE INFO: 0 business: payment@mobile9.com charset: windows-1252 first_name: amanda ipn_track_id: 2a5002329ba04 item_name: Plus Monthly Subscription item_number: MM|977383 last_name: hakki mc_currency: USD mc_fee: 0.43 mc_gross: 2.99 notify_version: 3.8 payer_email: underthecovers@iinet.net.au payer_id: AMETCW2ENDZGU payer_status: verified payment_date: 04:39:40 Nov 20, 2015 PST payment_fee: 0.43 payment_gross: 2.99 payment_status: Completed payment_type: instant protection_eligibility: Partially Eligible - Unauth Only receiver_email: payment@mobile9.com receiver_id: HNFJ3VJEEY4SA residence_country: AU subscr_id: I-4GXT1TST7VUF transaction_subject: Plus Monthly Subscription txn_id: 58P89968DA177754R txn_type: subscr_payment verify_sign: Anh.d8D9aiz0KVpGadUtN89QFkgKAq.xzmf0vOAE3LuVPvWFJ0FKiTvI