rfc:dbc

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
Last revisionBoth sides next revision
rfc:dbc [2015/02/12 14:36] francoisrfc:dbc [2017/09/22 13:28] – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2015-02-09   * Date: 2015-02-09
   * Author: François Laupretre <francois@php.net>   * Author: François Laupretre <francois@php.net>
-  * Status: Draft+  * Status: Discussion
   * First Published at: http://wiki.php.net/rfc/dbc   * First Published at: http://wiki.php.net/rfc/dbc
 +
 +  This RFC is waiting for the decisions that will be made about scalar
 +  type hinting. The reason is that the design and syntax
 +  decisions that will be made about scalar type hinting heavily impact the
 +  contents of this RFC. Proposal is subject to be changed according scalar type 
 +  hinting implementation.
  
 ===== Preamble ===== ===== Preamble =====
 +
 +This RFC is part of "Design by Contract Introduction" RFC
 +
 +  * https://wiki.php.net/rfc/introduce_design_by_contract
 +
 +There is alternative implementation proposal by "Definition"
 +
 +  * https://wiki.php.net/rfc/dbc2
 +
  
 The original idea of introducing DbC in PHP comes from Yasuo Ohgaki The original idea of introducing DbC in PHP comes from Yasuo Ohgaki
Line 313: Line 328:
 ^ string!    |  No      No      No        No        |  No      |  (6)      |  Yes      |  No         | ^ string!    |  No      No      No        No        |  No      |  (6)      |  Yes      |  No         |
 ^ array      |  No      No      No        No        |  Yes      No        No        No         | ^ array      |  No      No      No        No        |  Yes      No        No        No         |
-^ callable    No      No      No        No        |  (5)     |  No       |  (5)      |  No         |+^ callable    No      No      No        No        |  (5)     |  (5)      |  (5)      |  No         |
 ^ object      No      No      No        No        |  No      |  Yes      |  No        No         | ^ object      No      No      No        No        |  No      |  Yes      |  No        No         |
 ^ resource    No      No      No        No        |  No      |  No        No        Yes        | ^ resource    No      No      No        No        |  No      |  No        No        Yes        |
Line 389: Line 404:
 == callable == == callable ==
  
-A string or array returning true through 'is_callable($arg,true)'.+A string, object or array returning true through 'is_callable($arg,true)'.
  
 Please consult the [[http://php.net/manual/en/function.is-callable.php|is_callable() documentation]] for more details. Please consult the [[http://php.net/manual/en/function.is-callable.php|is_callable() documentation]] for more details.
Line 739: Line 754:
  
 [[https://wiki.php.net/rfc/dbc2|Alternative RFC]] [[https://wiki.php.net/rfc/dbc2|Alternative RFC]]
- 
rfc/dbc.txt · Last modified: 2018/03/01 23:19 by carusogabriel