Neue Auswahl mit Links zu Nachrichten und Materialien. In der Version: Objekte als Array-SchlĂŒssel und andere RFC-VorschlĂ€ge fĂŒr PHP 8.1, in denen WebAssembly in PHP ausgefĂŒhrt wird, Informationen zu Kollisionen in Arrays, ein Teil nĂŒtzlicher Tools, Artikel, Videos und PHP Live Digest .
Viel SpaĂ beim Lesen!
Nachrichten und Veröffentlichungen
PHP Russland wird auf den 28. Juni 2021 verschoben.
Ergebnisse des Jahres in der PHP-Welt - Skyeng Community Survey und PHP Digest. Letzte Woche um teilzunehmen.
PHP Interna
- [RFC] Object keys in arrays
.
$obj1 = new stdClass; $obj2 = new stdClass; $array = []; $array[$obj1] = 1; $array[$obj2] = 2; var_dump($array[$obj1]); // int(1) var_dump($array[$obj2]); // int(2)
SplObjectStorage
WeakMap
, . . ,array_*
.
, , , .
, RFC Enumerations . . . - [RFC] Object scoped RNG Implementations
rand()
mt_rand()
(seed)srand()
. - .
API , .
$seed = 1234; $rng = new RNG\MT19937($seed); $array = [1, 2, 3, 4, 5]; shuffle($array, $rng); //
, , , : random_bytes() random_int().
- [RFC] var_representation(): readable alternative to var_export()
var_export()
, , . RFCarray( )
[ ]
.
var_representation($value, int $flags=0) :string
,var_export()
.
brick/varexporter. - [RFC] Change Default mysqli Error Mode
mysqli ( PHPLive#3 ) : . :mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
mysqli CodeIgniter WordPress. - [RFC] Dump results of expressions in `php -a` â
php -a
. - PHP 8.1: What's New and Changed â php.watch , PHP 8.1. RFC - .
- fabpot/local-php-security-checker â composer.json . FriendsOfPHP/security-advisories.
GitHub action Docker- oxcom.
- funivan/PhpClean â PhpStorm, , , , , . .
- wasmerio/wasmer-php â WebAssembly PHP. wasm- PHP. Rust, wasm PHP. . .
- temporalio/sdk-php â PHP-SDK temporal.io â , , , , -.
.. - :#[Workflow\WorkflowInterface] class LoopWorkflow { private array $values = []; private array $result = []; private $simple; public function __construct() { $this->simple = Workflow::newActivityStub( SimpleActivity::class, ActivityOptions::new()->withStartToCloseTimeout(5) ); } #[SignalMethod] public function addValue( string $value ) { $this->values[] = $value; } #[WorkflowMethod(name: 'LoopWorkflow')] public function run( int $count ) { while (true) { yield Workflow::await(fn() => $this->values !== []); $value = array_shift($this->values); $this->result[] = yield $this->simple->echo($value); if (count($this->result) === $count) { break; } } return $this->result; } }
RoadRunner, reactphp/promise, PHP 8. , .
Symfony
- chaos-php/chaos-monkey-symfony-bundle â Chaos Monkey Symfony-. , .
Symfony: UX â JavaScript Symfony
Symfony 5.2: PHP 8- Symfony #734 (18-24 2021)
Laravel
- umbrellio/laravel-pg-extensions â Laravel Postgres.
- fico7489/laravel-eloquent-join â Eloquent.
- artisan.page â Laravel artisan.
/ multitenant Laravel Jetstream â .
Laravel Github Actions
18
Laravelâ (18â24 2021)
Yii
Async PHP
- walkor/Workerman â API, HTTP, WebSocket, SSL. libevent.
PHP the-benchmarker/web-frameworks, , .
socket.io walkor/phpsocket.io, PSR-7,15,17 chubbyphp/chubbyphp-workerman-request-handler, gotzmann/comet.
- PHP â , , PHP â -, DoS-.
2011 , 2^16 = 65536 PHP 30 0.01 . - php.watch: PHP Curl Security Hardening â cURL PHP .
- Telegram- PHP â beyondcode/expose.
- GitHub GitHub Actions PHP.
PHP.
: 30 .
PHP GitHub Scrutinizer.
GitHub Actions.
/
Xdebug 3: Diagnostics â , Xdebug - .
PhpStorm â , Christoph Rumpel PhpStorm: Mastering PhpStorm.
Live-coding a Bref Queue â PHP -. Matthieu Napoli, Bref.
PHP Release Radar #2: PHP 8 â Sara Golemon Gabriel Caruso 8.0, PHP .
-, PHP.- PHP 8 â @jrf_nl, , PHP 8 .
, PHP 1997-2017.
Brent Roose , , .
. . , , PHP 8.0TypeError
:
3v4l.org/pU0LDvar_dump(round("foo"));
, , :3v4l.org/Ln9g3$sub = substr('abcdef', 4, -4); if ($sub === false) { echo 'fail'; } else { echo 'do something with $sub'; } // PHP 5-7 > 'fail' // PHP 8 > 'do something with $sub'
: understandlegacycode.com. - Wie PHP aussehen wĂŒrde, wenn es von mir abhĂ€ngen wĂŒrde - Eine Auswahl wĂŒnschenswerter Funktionen von Brent Roose: final und void standardmĂ€Ăig, keine gemischten, Parameter und Eigenschaften mĂŒssen eingegeben werden, Generika, wohin können wir ohne sie gehen, Emails, Objekte fĂŒr Skalare .
Heute wird es den vierten Stream geben, der auf PHP Digest basiert. Analyse von Nachrichten und Links aus der Ausgabe mit Details und interessanten Details, die nicht in der Textausgabe enthalten sind. Gast Anton Titov mit einer Geschichte ĂŒber ein neues Instrument. Sowie die Ergebnisse der Zeichnung und eines neuen Wettbewerbs mit Elefanten.
Ab 20:00 Uhr Moskau, Minsk / 19:00 Uhr Kiew.
Wenn Sie einen Fehler oder eine Ungenauigkeit bemerken, teilen Sie uns dies bitte in einem persönlichen Habr oder Telegramm mit .
Weitere Neuigkeiten und Kommentare zum PHP Digest Telegram-Kanal .
Link senden
Links in allen Digests suchen
â Vorherige Ausgabe: PHP-Digest â 196