__hash()
, which will allow the use of objects as keys of arrays.function getUser(): User { return new User(); }
function getUser(): User { return new User(); }
readonly
access modifier, which will designate properties that can be written within the class and only for reading outside of it.to_int()
, to_float()
and to_string()
, which will return false
in case the transferred value cannot be cast to the appropriate type.Source: https://habr.com/ru/post/241565/
All Articles