In PHP 4 it was never necessary to define a class before using it in your code, although it would decrease script execution times a bit. The same is true for PHP 5, but if you are using Interfaces in your code, then you are required to define a class before using it.