Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Aug. 22nd 2014

Code Katas in PHP: Roman Numerals

Episode 2 Run Time 16:23

Download

In our next practice session, we need to build a class that will automatically translate a number into its roman numeral counterpart. As with the previous episode, we'll use TDD and PHPSpec to drive this process.

Homework: what would happen if the user passed 0 to our converter? Shouldn't we take exception to that? On your own, implement this functionality using TDD.

View the source for this lesson (and the homework solution) on GitHub.