📜 ⬆️ ⬇️

Scalar type hints in PHP

Johannes Schlüter has posted on his blog that scalar type hints has been added to trunk (PHP). Many of us have been waiting for this for a long time.

It looks like this:
function check_counter( int $counter)

If we try to pass non int into such a function, we get Catchable fatal error.


Source: https://habr.com/ru/post/101229/

All Articles