Enabling ‘strict_types’ globally in PHP 7

This is deliberately not possible, because the implementation adopted after an extremely long discussion of scalar type hints was this one: https://wiki.php.net/rfc/scalar_type_hints_v5 It introduces two modes for scalar type parameters, which both guarantee that the function receiving the parameters gets the types that it requires in its signature. However, it provides two modes for how … Read more

Should I use int or Int32

The two are indeed synonymous; int will be a little more familiar looking, Int32 makes the 32-bitness more explicit to those reading your code. I would be inclined to use int where I just need ‘an integer’, Int32 where the size is important (cryptographic code, structures) so future maintainers will know it’s safe to enlarge … Read more