Advertisement
xXCalleManXx

PHP Test #1

Sep 24th, 2020 (edited)
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // Create a php cli tool that takes a name as argument and estimates the age based on the name.
  2. // Use the following api: https://agify.io/
  3. // You cannot use any kind of libraries, it all must be vanilla PHP code and should not contain more that 30 lines of code.
  4. // Ex:
  5. // $ php estimate-age.php Casper
  6. // should output: You must be around 38 years old
  7. // $ php estimate-age.php 1234
  8. // should output: Could not estimate your age
  9. // $ php estimate-age.php
  10. // should output: You must pass a name
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement