I'm looking for a function identical to DateTime::createFromFormat but I need it to work in an environment running a version of PHP which is older than v5.3. Basically I need to provide a format, like you'd use with the Date() function, and I then need to parse/validate a string against that format, and return a timestamp if the string is formatted correctly and a valid date.
Anyone know where I can find something like that, or do I have to write it myself?
Again, this has to work with a specific format, provided as an argument. The format could be anything, so there's no guarantee I can just use strtotime().