PHP 8
PHP 8
公開!
名前付き引数を含む多くの新機能と最適化
名前付き引数RFC
htmlspecialchars($string, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
to用途
htmlspecialchars($string, double_encode: false);
foobar.pluralize('word') # returns 'words'
foobar.pluralize('goose') # returns 'geese'
foobar.singularize('phenomena') # returns 'phenomenon'
経度
class PostsController
{
/**
* @Route("/api/posts/{id}", methods={"GET"})
*/
public function get($id) { /* ... */ }
}
toclass PostsController
{
#[Route("/api/posts/{id}", methods: ["GET"])]
public function get($id) { /* ... */ }
}
Windowsでのインストール
* Download Specify version lastest
https://windows.php.net/download#php-8.0
selected thread safe or not thread safe
すべてのファイルをダウンロードこの例ではララゴンを使用しています
X:\laragon\bin\php\php-8.0.0-Win32-vs16-x86
remember change this line on
X:\laragon\etc\apache2\mod_php.conf
# This file is auto-generated, so please keep it intact.
LoadModule php8_module "x:/laragon/bin/php/php-8.0.0-Win32-vs16-x86/php8apache2_4.dll"
PHPIniDir "x:/laragon/bin/php/php-8.0.0-Win32-vs16-x86"
<IfModule mime_module>
AddType application/x-httpd-php .php
</IfModule>
to# This file is auto-generated, so please keep it intact.
LoadModule php_module "x:/laragon/bin/php/php-8.0.0-Win32-vs16-x86/php8apache2_4.dll"
PHPIniDir "x:/laragon/bin/php/php-8.0.0-Win32-vs16-x86"
<IfModule mime_module>
AddType application/x-httpd-php .php
</IfModule>
Reference
この問題について(PHP 8), 我々は、より多くの情報をここで見つけました https://dev.to/daniel6/php-8-5b3mテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol