امتیازها
113
راهحلها
27
- محل سکونت
- England
- نوشتهها
- 26,276
- تاریخ ثبتنام
- ۱۳۹۹٫۰۴٫۰۶
- پسندها
- 3,286
- سن
- 29
- وب سایت
- xenforo.xyz
- نسخه PHP
- 7.3
- نسخه زنفورو
- xenforo 2.2
Around line 55:
PHP:
The callback function should return an integer: -1, 0, or 1 for less than, equal to, or greater than, respectively. As far as I'm aware, returning a boolean has never been officially supported and will likely result in incorrect or indeterminate sorting.
PHP 8.0 explicitly disallows this:
Code:
Read more
PHP:
کد:
uksort($sub, function($a, $b)
{
return strlen($a) < strlen($b);
});
The callback function should return an integer: -1, 0, or 1 for less than, equal to, or greater than, respectively. As far as I'm aware, returning a boolean has never been officially supported and will likely result in incorrect or indeterminate sorting.
PHP 8.0 explicitly disallows this:
Code:
ErrorException: [E_DEPRECATED] uksort(): Returning bool from comparison function is deprecated...Read more
