समाचार और सामग्री के लिंक के साथ ताजा चयन। रिलीज में: PHPUnit 9 और अन्य रिलीज, PHP के इंटरनेशनल से 3 ताज़ा RFC ऑफर, उपयोगी टूल्स, वीडियो, पॉडकास्ट का एक हिस्सा और बहुत कुछ।
पढ़ने का मज़ा लें!
समाचार और विज्ञप्ति
PHP Internals
- [RFC] Allow function calls in constant expressions — , . RFC ( ) , , .
class MyClass {
const VALUES = [1, 0];
const C1 = count(self::VALUES);
public static $p = count(self::VALUES);
public function foo($param = count(self::VALUES))
{
static $bar = count(self::VALUES);
}
}
- [RFC] __toArray() —
__toArray()
, , array return type array. class Person
{
protected $name;
protected $email;
public function __toArray()
{
return [
'name' => $this->name,
'email' => $this->email,
];
}
}
$person = new Person('John Doe', 'j.doe@example.com');
$personArray = (array) $person;
function foo(array $person) {
var_dump($person);
}
function bar(Person $person): array {
return $person;
}
var_dump(bar($person));
- [RFC] Userspace operator overloading — PHP. , Internals. PHP 7.4 lisachenko/z-engine.
- [RFC] Validation for abstract trait methods — . :
trait T {
abstract public function test(int $x);
}
class C {
use T;
public function test(string $x) {}
}
.
-, , RFC-: , . - : Static return type, Variable Syntax Tweaks, Allow ::class on objects, declare(function_and_const_lookup='global')
- PHP — PHP.
- php/doc-en — PHP - GitHub edit.php.net.

Symfony
Laravel
Async PHP

/

ध्यान देने के लिए आपको धन्यवाद!
यदि आपको कोई गलती या अशुद्धि दिखती है - कृपया मुझे पीएम को सूचित करें ।
प्रश्न और सुझाव मेल या ट्विटर पर लिखते हैं ।
टेलीग्राम चैनल: PHP डाइजेस्ट ।
संदेश लिंक
सभी डाइजेस्ट के लिए खोज लिंक
← पीएचपी डाइजेस्ट नं 172: पिछला रिलीज