#507·psysh

Parameter type hints while typing

Author: tgrCreated Jun 22, 2018Updated Oct 21, 2025
Labelsenhancementreadline

It would be awesome to get parameter type hints (maybe even parameter documentation) when typing function arguments. The doc command can be used for this but it's a bit inconvenient. Tab completion could be hijacked for this nicely:

$foo->bar(<tab><tab>

could show the type and name of the parameter.

$foo->bar(x<tab><tab>

would work in the normal way, finding global methods / variables / whatever starting with x. This way, it would be impossible to use double-tab to get a list of all global functions, but that functionality is fairly useless anyway.