3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "google-play argos-cashback-uk currys-b2b tesco costa new-look boots-digital starbucks m-and-s-uk-cb airbnb sainsburys-cashback-uk jlp asda tk-maxx just-eat"; $array = explode("\t", $input); foreach ($array as $key => $value) { echo " {\n"; echo ' "referenceId": "'.$value.'",' . "\n"; echo ' "position": "'.$key + 1 . "\n"; echo ' },' . "\n"; }
Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
{ "referenceId": "google-play", "position": "1 }, { "referenceId": "argos-cashback-uk", "position": "2 }, { "referenceId": "currys-b2b", "position": "3 }, { "referenceId": "tesco", "position": "4 }, { "referenceId": "costa", "position": "5 }, { "referenceId": "new-look", "position": "6 }, { "referenceId": "boots-digital", "position": "7 }, { "referenceId": "starbucks", "position": "8 }, { "referenceId": "m-and-s-uk-cb", "position": "9 }, { "referenceId": "airbnb", "position": "10 }, { "referenceId": "sainsburys-cashback-uk", "position": "11 }, { "referenceId": "jlp", "position": "12 }, { "referenceId": "asda", "position": "13 }, { "referenceId": "tk-maxx", "position": "14 }, { "referenceId": "just-eat", "position": "15 },
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
48.14 ms | 408 KiB | 5 Q