Nova seleção com links para notícias e materiais. Na versão: PHPUnit 9 e outras versões, 3 novas RFC oferecem da PHP Internals, uma parte de ferramentas úteis, vídeos, podcasts e muito mais.
Gostar de ler!
Notícias e Lançamentos
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

/

Obrigado pela atenção!
Se você perceber um erro ou imprecisão - informe-me no PM .
Perguntas e sugestões escreva para o correio ou twitter .
Canal de telegrama: PHP Digest .
Enviar link
Pesquisar links para todos os resumos
← Versão anterior: PHP Digest No. 172