SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast laresistance2's Avatar
    Join Date
    May 2011
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHPDOC | Search the list of possible types for @param

    Hello,

    I want to know the valid types for the @param and @return of phpdoc
    I also want to know if the type "character" is correct.

    Example:
    PHP Code:
    <?php
    /**
     * @param string $text
     * @return character
     */
    function get_letter($text)
    {
        return 
    substr($letter,0,1);
    }
    Thank you
    Last edited by laresistance2; Dec 8, 2012 at 08:56. Reason: phpdoc

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    http://us1.php.net/manual/en/language.types.php
    And no, "character" is not a valid type. PHP has no "char" type, only string.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •