migration guide
PHP: PHP . .x PHP . .x - Manual
https://www.php.net/manual/ja/migration .php
@rana_kualu
PHP . PHP . - Qiita
https://qiita.com/rana_kualu/items/fe fbe d d
PHP . - Qiita
https://qiita.com/rana_kualu/items/c cb c ee c
php.watch
PHP . : What's New and Changed PHP.Watch
https://php.watch/versions/ .
Slide 13
Slide 13 text
$ . JIT(Just-In-Time compilation)
Slide 14
Slide 14 text
JIT
(JIT)
PHP( )
OP
VM
PHP
Slide 15
Slide 15 text
OPCache
PHP .
OP
OP
VM
Slide 16
Slide 16 text
Preload
PHP .
On server startup ( )
Slide 17
Slide 17 text
JIT
PHP .
OP
VM
Slide 18
Slide 18 text
:youtube:
Slide 19
Slide 19 text
Web
JIT
(bench.php) 2.78
PHP-Parser 2.11
WordPress 1.05
IMO: Web App
Slide 20
Slide 20 text
$ . Attribute
Slide 21
Slide 21 text
Attribute
PHP
Similar concepts exist in other languages
named Annotations in Java, Attributes in C#, C++, Rust,
Hack and Decorators in Python, Javascript.
https://wiki.php.net/rfc/attributes_v
doc-comment
Slide 22
Slide 22 text
syntax
`#[sukinamono]`
class, property, method
`#[Attribute]`
attribute
attribute Re ection
syntax
`A|B|C`
`void`
false
`A|false`
`true` `A|true`
(`bool`
)
object(SpecialDay)#1 (0) {
}
object(SpecialDay)#1 (0) {
}
Fatal error: Uncaught TypeError:
SpecialDay::create(): Argument #1 ($dow) must be of
type string|int, bool given, called in /in/oPlMf on
line 17 and defined in /in/oPlMf:5
Stack trace:
#0 /in/oPlMf(17): SpecialDay::create(false)
#1 {main}
thrown in /in/oPlMf on line 5