February 26, 2003 | Category:

PHP Challenge #2

It’s time for the second PHP challenge. This time I want an Integer to Roman Numeral converter. So the script should accept a single parameter (an integer), and return the roman numeral which corresponds to the integer. If anyone has any difficulty trying to work out how to do this, search google for information on roman numerals.

Here are the rules:

  • The winner is the person who writes the shortest script that works on sample integers that I will run on it
  • All functions must return a value,
  • All functions must be called RNC,
  • All functions submitted are considered public domain and hence can be reproduced and used with or without credit to anyone by anyone (so no bitching if someone rips off your script after the challenge finishes),
  • The winning script will be archived here for prosperity and to help others,
  • New rules may be added here at any time,
  • New Rule: The script should be able to handle integers in the range 1 to 4999. If no-one manages this, the upper-limit will be lowered to 3999. Handling integers outside this range is unnecessary,
  • My decision is final, but the shortest (file size) script will be the winner,
  • All functions should be submitted to Solitude@vkps.co.uk,
  • The deadline for entries is 12pm GMT on March 5th 2003

That should be fairly simple to follow. Any questions should be sent to the same email address. Good luck!