1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Use PHP 8+ square brackets for array elements

The curly braces syntax for array elements has been removed in PHP 8.0.
This commit is contained in:
Peter Kokot
2026-01-15 16:58:56 +01:00
parent 19b30032c9
commit c4084bb8f3

View File

@@ -180,7 +180,7 @@ foreach ($encodings as $e) {
/* process file */
$map = array();
$lines = explode("\n", file_get_contents($e{'file'}));
$lines = explode("\n", file_get_contents($e['file']));
foreach ($lines as $l) {
if (preg_match("/^0x([0-9A-Z]{2})\t0x([0-9A-Z]{2,})/i", $l, $matches))
$map[] = array($matches[1], $matches[2]);
@@ -323,7 +323,7 @@ foreach ($encodings as $e) {
/* process file */
$map = array();
$lines = explode("\n", file_get_contents($e{'file'}));
$lines = explode("\n", file_get_contents($e['file']));
foreach ($lines as $l) {
if (preg_match("/^0x([0-9A-Z]{2})\t0x([0-9A-Z]{2,})\s+#\s*(.*)$/i", $l, $matches))
$map[] = array($matches[1], $matches[2], rtrim($matches[3]));