rfc:typehint

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:typehint [2008/04/17 02:12] – Fix error messages. feliperfc:typehint [2008/04/17 14:36] felipe
Line 3: Line 3:
   * Date: 2008-04-07   * Date: 2008-04-07
   * Author: Felipe Pena <felipensp@gmail.com>   * Author: Felipe Pena <felipensp@gmail.com>
-  * Status: Under Discussion+  * Status: [[http://news.php.net/php.internals/37049|Under Discussion]]
  
 ====== Details of implementation ====== ====== Details of implementation ======
 **Parameter type hint:** **Parameter type hint:**
-  - The behavior when the default value is NULL was keeped.+  - The behavior when the default parameter value is ''NULL'' was keeped.
 **Both:** **Both:**
   - Binary and unicode string are specified by ''string''.   - Binary and unicode string are specified by ''string''.
Line 15: Line 15:
 ==== BC Break ==== ==== BC Break ====
 No BC break using the "(type)" syntax. (Inspirated by Objective-C) No BC break using the "(type)" syntax. (Inspirated by Objective-C)
 +
  
 ==== Examples ==== ==== Examples ====
Line 96: Line 97:
 } }
  
-test('1337'); +test('1337'); // Catchable fatal error: The returned value must be of the type integer
-test(-1); +
-test(1); +
-test(1.); // Catchable fatal error: The returned value must be of the type integer+
 </code> </code>
  
Line 202: Line 200:
  
  
-===== Patches =====+===== Patches & tests =====
  
-  - Return value type hint: http://felipe.ath.cx/diff/return_type_hint.diff (under construction) +  - Return value type hint: http://felipe.ath.cx/diff/return_type_hint.diff 
-  - Parameter type hint: http://felipe.ath.cx/diff/param_type_hint.diff (under construction)+  - Parameter type hint: http://felipe.ath.cx/diff/param_type_hint.diff 
 +  - Tests: http://felipe.ath.cx/diff/tests/
  
rfc/typehint.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1