rfc:inconsistent-behaviors
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:inconsistent-behaviors [2014/02/05 03:09] – created yohgaki | rfc:inconsistent-behaviors [2014/02/05 03:16] – yohgaki | ||
---|---|---|---|
Line 6: | Line 6: | ||
* Status: Draft (or Under Discussion or Accepted or Declined) | * Status: Draft (or Under Discussion or Accepted or Declined) | ||
* First Published at: http:// | * First Published at: http:// | ||
- | * Renamed to: https:// | + | * Renamed to: https:// |
This RFC is to discuss comparison and conversion inconsistencies in PHP. | This RFC is to discuss comparison and conversion inconsistencies in PHP. | ||
Line 216: | Line 216: | ||
===== Function/ | ===== Function/ | ||
- | ==== is_numeric | + | ==== assert |
- | https:// | + | assert() does not accept closure while it accepts functions. |
+ | < | ||
+ | php > function f() {return FALSE;} | ||
+ | php > assert(f()); | ||
+ | |||
+ | Warning: assert(): Assertion failed in php shell code on line 1 | ||
+ | php > assert(function() {return FALSE;}); | ||
+ | </ | ||
+ | |||
+ | https:// | ||
==== base_convert ==== | ==== base_convert ==== | ||
Line 225: | Line 234: | ||
https:// | https:// | ||
- | ==== assert ==== | ||
- | assert() does not accept closure while it accepts functions. | + | ==== is_numeric ==== |
- | https://wiki.php.net/rfc/ | + | https://bugs.php.net/bug.php? |
- | ==== min() function | + | |
+ | ==== min ==== | ||
https:// | https:// | ||
This is not a bug. If one of operand is BOOL(or NULL), both operands are converted to BOOL and evaluated as BOOL. It may be good idea that document this behavior in min() manual. | This is not a bug. If one of operand is BOOL(or NULL), both operands are converted to BOOL and evaluated as BOOL. It may be good idea that document this behavior in min() manual. | ||
+ | |||
+ | **Status** | ||
+ | Documented. | ||
+ | |||
+ | http:// | ||
+ | |||
==== Return value of wrong internal function/ | ==== Return value of wrong internal function/ |
rfc/inconsistent-behaviors.txt · Last modified: 2021/03/27 14:31 by ilutov