diff --git a/php-phpday25.xml b/php-phpday25.xml index b8cfddca..3f0fc375 100644 --- a/php-phpday25.xml +++ b/php-phpday25.xml @@ -37,6 +37,9 @@ https://wiki.php.net/rfc/new_without_parentheses https://wiki.php.net/rfc/closures_in_const_expr slides/internals/php85-closures-in-constant-expressions.xml +https://wiki.php.net/rfc/pipe-operator-v3 +slides/internals/php85-pipes.xml + https://wiki.php.net/rfc/fcc_in_const_expr slides/internals/php85-fcc-in-constant-expressions.xml @@ -76,8 +79,10 @@ https://wiki.php.net/rfc/new_rounding_modes_to_round_function slides/internals/php84-round-modes.xml --> + https://wiki.php.net/rfc/grapheme_str_split slides/internals/php84-grapheme-str-split.xml diff --git a/slides/internals/php85-closures-in-constant-expressions.xml b/slides/internals/php85-closures-in-constant-expressions.xml index f8bd4d00..d17b8287 100644 --- a/slides/internals/php85-closures-in-constant-expressions.xml +++ b/slides/internals/php85-closures-in-constant-expressions.xml @@ -20,12 +20,10 @@ function slugger( var_dump(slugger('Hello, World!')); // string(11) "hello-world" ?>]]> -
They must be %static% They may not include variables from the surrounding scope
no: %use($foo)%, nor: short closures (%fn … =>%)
-
diff --git a/slides/internals/php85-pipes.xml b/slides/internals/php85-pipes.xml new file mode 100644 index 00000000..f0a12821 --- /dev/null +++ b/slides/internals/php85-pipes.xml @@ -0,0 +1,27 @@ + +PHP 8.5: Pipe Operator + + \strtolower(...) + |> fn($x) => \preg_replace('/[^a-z]/', '-', $x) + |> fn($x) => \trim($value, '-') + |> fn($x) => \preg_replace('/-+/', '-', $x); +} + + + + + + + +var_dump(slugger('Hello, World!')); // string(11) "hello-world" +?>]]> + + + Still under consideration (but currently passing) + + +