I was testing some strings (countries) with the
strtotime()
function and foud out that :
- 'Poland' does returns a timestamp, but 'Soland' or anything else like this does not.
- 'GB' does too.
Going farther, 'a string' is also returning something, juste like some simple Letters like 'G' or 'P'.
Those strings are not listed in the datetime relative formats doc.
I might be dumb but I didn't find anything on those special cases, what is actually going on ?
And second less important question : how to actually check if a string is a valid date format excluding those "special" strings, knowing I don't know the format in advance ?