Search code examples
phpphpdoc

Php specify type in phpdoc for ftp connection


I have a property protected $connection. It is the result of ftp_connect. I want to add phpdoc for it. But I do not know its type. I tried to dump it and the result is FTP buffer resource. gettype result is just resource. Is there a way do document it?


Solution

  • the type is resource it is special php type.

    The proper doc should be

    /**
     *  @var resource
     */
    

    You can find it as well on phpdoc site with types