Ad
  • Custom User Avatar

    For the first part of the Kata Task, the nature of what you're doing (setting key-value pairs in the $_GET superglobal) is correct, but I'm not sure where you got the key-value pairs $_GET['first'] = 'abba', $_GET['last'] = 'ojcze' and $_GET['year'] = '2015' from? The first part of the task is independent from the second part of the task and in the first part of the task, the only URL you should be "parsing" (with your brain, not with the PHP code ;) ) is http://example.com/path/to/somefile.php?rank=-7&author=donaldsebleung&keywords=php&rating=5. To give you a further hint, the first key-value pair I can spot from that URL is rank=-7.

    For the second part of the Task, no, you do not return anything because you shouldn't think of the user_script() as an ordinary function but rather a PHP script you're writing for a real world webpage. If you follow the instructions in the second part of the Task word-for-word, you should be able to complete the Kata.

    Hope this helps :)

    P.S. Next time you post your code in a comment, don't forget to mark it as a spoiler ;)