Recent Activity

Magento has just released the SUPEE-10415 security patch for the following versions:

  • Magento Commerce (formerly known as Enterprise Edition)
  • Magento Open Source (formerly known as Community Edition)

The patch contains fixed for several security vulnerabilities including cross-site request forgery (CSRF), Denial-of-Service (DoS), and authenticated Admin user remote code execution (RCE).


I recently came across this really helpful PHP trick:

You can cast a numeric string to either int or float, depending on its contents, by simply adding 0:

var_dump("1" + 0);
// int(1)

var_dump("1." + 0);
// float(1)

var_dump("1.0" + 0);
// float(1)

var_dump("1.5" + 0);
// float(1.5)

That's much cleaner than trying to make a conditional cast yourself: