3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "days=Mon&days=Wed" . "&fruit[1]=Apple&fruit[]=Banana&amp;age=13"; parse_str($str, $output); // gettype will return 'array' or 'string' echo gettype($output['days']); echo ' - '; // array_search will return the key // where the first argument is located echo array_search('Banana', $output['fruit']); echo ' - '; echo array_key_exists('age', $output) ? $output['age'] : 0; ?>

preferences:
41.16 ms | 402 KiB | 5 Q