function hideEmail(string $email, int $length = 3, string $symbol = '*'): string
{
$emailData = explode('@', $email);
$username = str_split($emailData[0], $length);
$middle = floor(count($username) / 2);
$username[$middle] = str_repeat($symbol, $length);
return implode('', $username) . '@' . $emailData[1];
}
// Вводный данные
$height = readline('Укажите высоту: ');
$width = readline('Укажите ширину: ');
// Определяем центр
$middle = ['j' => $height / 2, 'i' => $width / 2];
for ($i = 0; $i < $width; $i++) {
for ($j = 0; $j < $height; $j++) {
echo min(
$i < $middle['i'] ? $i + 1 : $width - $i,
$j < $middle['j'] ? $j + 1 : $height - $j
);
}
echo "\n";
}
stream_copy_to_stream(
fopen('php://input', 'r'),
fopen($saveFilePath, 'w')
);
$(window).off('scroll');
function myScrollFunction(){
if($(window).scrollTop()>120){
$('#top').fadeIn(900)
}else{
$('#top').fadeOut(700)
}
}
/////
$(window).scroll(myScrollFunction);
////
$(window).off('scroll', myScrollFunction);
$tagName = 'tag';
${$tagName . '_red'} = 1;
${$tagName . '_black'} = 2;
$tagName = 'tag';
$reds = [];
$blacks = [];
$reds[$tagName] = 1;
$blacks[$tagName] = 2;
$tagName = 'tag';
$tags = [];
$tags[$tagName . '-red'] = 1;
$tags[$tagName . '-black'] = 2;