Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
rfc:objects-can-be-falsifiable [2022/10/31 19:23] – Update references joshbruce | rfc:objects-can-be-falsifiable [2022/11/03 14:49] – Add invokable RFC joshbruce |
---|
* Version: 0.92 | * Version: 0.92 |
* Date: 2020-07-16 | * Date: 2020-07-16 |
* Author: Josh Bruce, josh@joshbruce.dev | * Author: Josh Bruce, josh@joshbruce.com |
* Implementer: seeking (or someone willing to answer specific questions when I have them) | * Implementer: seeking (or someone willing to answer specific questions when I have them) - https://github.com/joshbruce/php-src/pull/2 |
* Status: Under discussion | * Status: Under discussion |
* First Published at: http://wiki.php.net/rfc/objects-can-be-falsifiable | * First Published at: http://wiki.php.net/rfc/objects-can-be-falsifiable |
| |
===== Open Issues ===== | ===== Open Issues ===== |
| |
| ==== November 3, 2022 ==== |
| |
| * How would this impact <php>callable</php>? Would a class using __invoke default to true? Can the same class implement Falsifiable and return false? |
| |
==== July 16, 2020 ==== | ==== July 16, 2020 ==== |
===== Implementation ===== | ===== Implementation ===== |
| |
Temporary PR for implementation, with status notes: https://github.com/joshbruce/php-src/pull/1 | Temporary PR for implementation, with status notes: https://github.com/joshbruce/php-src/pull/2 |
| |
After the project is implemented, this section should contain | After the project is implemented, this section should contain |
Implemented: | Implemented: |
| |
| * [[https://wiki.php.net/rfc/null-false-standalone-types|PHP RFC: Allow null and false as stand-alone types]] |
* [[https://wiki.php.net/rfc/union_types_v2|PHP RFC: Union Types 2.0]] - accept multiple types, including <php>null</php> | * [[https://wiki.php.net/rfc/union_types_v2|PHP RFC: Union Types 2.0]] - accept multiple types, including <php>null</php> |
* [[https://wiki.php.net/rfc/counting_non_countables|PHP RFC: Counting of non-countable objects]] - return <php>1</php> or <php>0</php>, not <php>null</php>. | * [[https://wiki.php.net/rfc/counting_non_countables|PHP RFC: Counting of non-countable objects]] - return <php>1</php> or <php>0</php>, not <php>null</php>. |
| |
Accepted: | Accepted: |
| |
| * [[https://wiki.php.net/rfc/true-type|PHP RFC: Add true type]] - allow specifying true or false when typesetting |
| |
Under review and discussion: | Under review and discussion: |
| |
* [[https://wiki.php.net/rfc/to-array|PHP RFC:__toArray()]] - implementation reference and where magic method should live | * [[https://wiki.php.net/rfc/to-array|PHP RFC:__toArray()]] - implementation reference and where magic method should live |
| * [[https://wiki.php.net/rfc/invokable|PHP RFC: Invokable]] - see also [[https://www.php.net/manual/en/function.is-callable.php|is_callable]] |
| |
Declined: | Declined: |
| |
| * [[https://wiki.php.net/rfc/stricter_implicit_boolean_coercions|PHP RFC: Stricter implicit boolean coercions]] - indicates desire for more control around true-false behavior |
* [[https://wiki.php.net/rfc/userspace_operator_overloading|PHP RFC: Userspace operator overloading]] - could facilitate <php>__toBool()</php> by proxy via operators | * [[https://wiki.php.net/rfc/userspace_operator_overloading|PHP RFC: Userspace operator overloading]] - could facilitate <php>__toBool()</php> by proxy via operators |
* [[https://wiki.php.net/rfc/pipe-operator-v2|PHP RFC: Pipe Operator v2]] - chain using object instance using <php>__invoke()</php> | * [[https://wiki.php.net/rfc/pipe-operator-v2|PHP RFC: Pipe Operator v2]] - chain using object instance using <php>__invoke()</php> |
Other: | Other: |
| |
| * [[https://wiki.php.net/rfc/null_coercion_consistency|RFC describing some NULL-related issues]] and [[https://wiki.php.net/rfc/allow_null|another]] |
* [[https://externals.io/message/111009|Official thread]] | * [[https://externals.io/message/111009|Official thread]] |
* [[https://externals.io/message/111076|Mention of type juggling tables being added]] - started as new thread | * [[https://externals.io/message/111076|Mention of type juggling tables being added]] - started as new thread |