The Image class can still send a string. I was referring to your switch statement.Theory? wrote:I used those initially, but I realized that if I wanted to have a variable header, should one be needed, I can still rely on the method from the Image class to simply provide that instead of me having to do the translation later. Is there any substantial performance gains to using the IMAGETYPE constants?
There technically would be a performance increase, as PHP wouldn't have to parse those strings every time. However, unless you're getting millions of hits a day, the increase would be negligible. I just like using pre-defined constants wherever I can.
@~inghamn: Does your setup prevent the 404 header from being sent to the browser? If not, that could wreak havoc on bots (ie: Google, Yahoo!).