rfc:returntypehint

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:returntypehint [2010/07/29 00:10] – New example feliperfc:returntypehint [2010/07/29 00:44] – - Update example felipe
Line 116: Line 116:
  
 $func = new ReflectionMethod('foo::test'); $func = new ReflectionMethod('foo::test');
-var_dump($func->getReturnType()); // "Test" +var_dump($func->getReturnType());   // "Test" 
-var_dump($func->returnsObject()); // true+var_dump($func->returnsObject());   // true
 var_dump($func->getReturnClass());  // "Test" var_dump($func->getReturnClass());  // "Test"
 </code> </code>
Line 132: Line 132:
 $func = new ReflectionFunction('abc'); $func = new ReflectionFunction('abc');
 var_dump($func->getReturnType()); // scalar var_dump($func->getReturnType()); // scalar
 +var_dump($func->returnsScalar()); // true
 </code> </code>
  
Line 137: Line 138:
 ===== Patch ===== ===== Patch =====
  
-Comming soon+  * Engine + Reflection: http://felipe.ath.cx/diff/returntypehint.diff 
 +  * Tests: http://felipe.ath.cx/diff/tests/return_typehint_tests.zip
rfc/returntypehint.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1