3v4l.org

run code in 300+ PHP versions simultaneously
<?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"; }
Output for 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Warning: Undefined array key 2 in /in/RVUk5 on line 25 Warning: Undefined array key 3 in /in/RVUk5 on line 25 Warning: Undefined array key 4 in /in/RVUk5 on line 25 Warning: Undefined array key 5 in /in/RVUk5 on line 25 Warning: Undefined array key 6 in /in/RVUk5 on line 25 Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/RVUk5 on line 5 Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /in/RVUk5 on line 10 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/RVUk5 on line 13 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 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Warning: Undefined array key 2 in /in/RVUk5 on line 25 Warning: Undefined array key 3 in /in/RVUk5 on line 25 Warning: Undefined array key 4 in /in/RVUk5 on line 25 Warning: Undefined array key 5 in /in/RVUk5 on line 25 Warning: Undefined array key 6 in /in/RVUk5 on line 25 Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/RVUk5 on line 5 Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /in/RVUk5 on line 10 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/RVUk5 on line 13 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 8.1.0 - 8.1.28
Warning: Undefined array key 2 in /in/RVUk5 on line 25 Warning: Undefined array key 3 in /in/RVUk5 on line 25 Warning: Undefined array key 4 in /in/RVUk5 on line 25 Warning: Undefined array key 5 in /in/RVUk5 on line 25 Warning: Undefined array key 6 in /in/RVUk5 on line 25 Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /in/RVUk5 on line 5 Deprecated: strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated in /in/RVUk5 on line 10 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/RVUk5 on line 16 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 8.0.0 - 8.0.30
Warning: Undefined array key 2 in /in/RVUk5 on line 25 Warning: Undefined array key 3 in /in/RVUk5 on line 25 Warning: Undefined array key 4 in /in/RVUk5 on line 25 Warning: Undefined array key 5 in /in/RVUk5 on line 25 Warning: Undefined array key 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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
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 7.3.32 - 7.3.33
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.5.0 - 5.5.38, 5.6.0 - 5.6.40
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

preferences:
199.51 ms | 404 KiB | 330 Q