rfc:returntypehint
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:returntypehint [2010/07/28 20:08] – New exampel felipe | rfc:returntypehint [2010/07/29 00:44] – - Update example felipe | ||
---|---|---|---|
Line 72: | Line 72: | ||
} | } | ||
// PHP Fatal error: | // PHP Fatal error: | ||
+ | </ | ||
+ | |||
+ | === Using a namespaced class === | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | |||
+ | namespace foo { | ||
+ | class foo { } | ||
+ | class bar extends foo { } | ||
+ | } | ||
+ | |||
+ | namespace bar { | ||
+ | class bar { | ||
+ | public function \foo\foo test() { | ||
+ | return new \foo\bar; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | $bar = new bar; | ||
+ | $bar-> | ||
+ | } | ||
</ | </ | ||
Line 94: | Line 116: | ||
$func = new ReflectionMethod(' | $func = new ReflectionMethod(' | ||
- | var_dump($func-> | + | var_dump($func-> |
- | var_dump($func-> | + | var_dump($func-> |
var_dump($func-> | var_dump($func-> | ||
</ | </ | ||
Line 110: | Line 132: | ||
$func = new ReflectionFunction(' | $func = new ReflectionFunction(' | ||
var_dump($func-> | var_dump($func-> | ||
+ | var_dump($func-> | ||
</ | </ | ||
Line 115: | Line 138: | ||
===== Patch ===== | ===== Patch ===== | ||
- | Comming soon | + | * Engine + Reflection: http:// |
+ | * Tests: http:// |
rfc/returntypehint.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1