note 107083 added to language.oop5.typehinting
| From: | ben at osu1 dot php dot net | Date: | Thu, 05 Jan 2012 18:48:01 +0000 |
| Subject: | note 107083 added to language.oop5.typehinting | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185378@lists.php.net to get a copy of this message | ||
RE: john at cast dot com 30-Apr-2011 01:33
Many IDEs such as Eclipse will offer intelligent autocomplete or suggestions based on a combination
of type hinting, as well as phpdocs. Try including phpdocs before functions and specifying the
return type of the function using the @return directive, and you'll be pleasantly surprised.
Note: You can automatically insert phpdoc templates before a function by using starting a block
comment with two stars:
<?php
/** <HIT ENTER>
function myfunc($myparam){
return $myparam;
}
?>
Will automatically add
<?php
/**
*
* Enter description here...
* @param $myparam
* @return my return
*/
function myfunc($myparam){
return $myparam;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 69.38.131.90
----
Manual Page -- http://www.php.net/manual/en/language.oop5.typehinting.php
Edit -- https://master.php.net/note/edit/107083
Del: integrated -- https://master.php.net/note/delete/107083/integrated
Del: useless -- https://master.php.net/note/delete/107083/useless
Del: bad code -- https://master.php.net/note/delete/107083/bad+code
Del: spam -- https://master.php.net/note/delete/107083/spam
Del: non-english -- https://master.php.net/note/delete/107083/non-english
Del: in docs -- https://master.php.net/note/delete/107083/in+docs
Del: other reasons-- https://master.php.net/note/delete/107083
Reject -- https://master.php.net/note/reject/107083
Search -- https://master.php.net/manage/user-notes.php