The error (2002) Can't connect to ... normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.https://dev.mysql.com/doc/refman/8.0/en/can-not-co...
А при чем тут версия интерпретатора?Что-то из статуса deprecated перешло в removed. Какие-то ошибки вместо warning начали выдавать error.
$a = '1d 35m';
if (preg_match('/^(?:(?<days>\d+)d)?\s*(?:(?<hours>\d+)h)?\s*(?:(?<minutes>\d+)m)?\s*(?:(?<seconds>\d+)s)?$/', $a, $matches)) {
$resultSec = intval($matches['days'] ?? '') * 86400 + intval($matches['hours'] ?? '') * 3600
+ intval($matches['minutes'] ?? '') * 60 + intval($matches['seconds'] ?? '');
echo $resultSec;
} else {
echo 'error';
}
// 88500
in_array(mixed $needle, array $haystack, bool $strict = false): bool
strripos(string $haystack, string $needle, int $offset = 0): int|false
array_reduce(array $array, callable $callback, mixed $initial = null): mixed
array_map(?callable $callback, array $array, array ...$arrays): array