Nueva selección con enlaces a noticias y materiales. En el lanzamiento: objetos como claves de matriz y otras propuestas de RFC para PHP 8.1, ejecutando WebAssembly en PHP, sobre colisiones en matrices, una parte de herramientas útiles, artículos, videos, PHP Live Digest .
¡Disfruta leyendo!
Noticias y comunicados
- PHP Rusia se pospone hasta el 28 de junio de 2021.
- Resultados del año en el mundo PHP : Encuesta a la comunidad de Skyeng y Resumen de PHP. La semana pasada para participar.
PHP Internals
- [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. - Cómo se vería PHP si dependiera de mí : una selección de características deseables de Brent Roose: final y nulo por defecto, sin mezcla, los parámetros y propiedades deben escribirse, genéricos, dónde podemos ir sin ellos, enams, objetos para escalares .
Hoy habrá el cuarto flujo basado en PHP Digest. Análisis de noticias y enlaces del número con detalles y detalles interesantes que no se incluyen en la edición de texto. Invitado Anton Titov con una historia sobre un nuevo instrumento. Así como los resultados del dibujo y un nuevo concurso con elefantes.
A partir de las 20:00 Moscú, Minsk / 19:00 Kiev.
Si observa un error o inexactitud, háganoslo saber en un habr personal o telegrama .
Más noticias y comentarios en el canal PHP Digest Telegram .
Enviar enlace
Buscar enlaces en todos los resúmenes
← Número anterior: PHP-Digest № 196