I was warned about getting back into PHP, but I didn’t listen, and now I have to solve silly problems created by the language trying to be ‘helpful’.
PHP doesn’t cast a string into an integer, unless it thinks it needs to, and vice versa. If you are just working in PHP, that probably won’t bite you on the butt too often. But if you need to integrate with another language, like say Java, because you are using PHP and selenium together in a BEHAT environment, you might get an error like, Can’t convert java.lang.String to int
Which you have to solve by doing
function ITakeAnInt($mynumericstring) // called with a paramter of 500;
$mynumericint = $mynumericstring + 0;
Seriously, if you can think of a less silly way to solve the lack of an explicit cast function in PHP, I’m all ears.