Most voted "type-induction" questions
In some languages, it is when the functions can force the parameters to be of a certain type or object.
Learn more…3 questions
Sort by count of
-
13
votes2
answers995
viewsPHP 7 has argument typing and return, but is it optional. Is that good or bad?
I would not like to raise here a controversial issue regarding the PHP 7 language, which was released recently, but only understand a few points regarding typing. Come on: In versions prior to PHP…
-
5
votes5
answers156
viewsType induction for any type of object
I am wanting to make a method of a certain class accept an object as a parameter. However, this object could be of any type. Example: class classeExemplo { public function meuMetodo(Object $objeto)…
-
1
votes1
answer317
viewsCallable keyword in PHP
The keyword callable was implemented from PHP 5.4. It provides a way to type an argument from a function, requiring the type of argument to be a callback. Example: function minha_funcao($a, callable…