Tag: Magic

A Thing I Found Out About PHP The Hard Way And Think Is Ridiculous

So PHP has some pretty helpful native functions like isset() and empty() which can be used to check if a variable exists and if it has a value, respectively. For those of you who don’t know, if you try to use the value of a variable that, for some reason, doesn’t exist at that point in the code your users will see a lovely error right on the page. Say if you have optional fields on a form, you can use isset($_POST[‘my_optional_field_1’]) before trying to get it’s value – because if the field was empty on form submission then my_optional_field_1 won’t be in the $_POST variable and you’ll generate an…

Google Had Best Get on Top of This Shit Right Now

Why isn’t “<date> to now” a thing on Google that tells you how long ago that date was? I mean, I get the little card thing for Barack Obama’s height. It even has a calculator and automatically converts a bunch of stuff for you, so why not date differentials?