<?php /* https://www.php.net/manual/en/function.ctype-print.php Returns true if every character in text will actually create output (including blanks). Returns false if text contains control characters or characters that do not have any output or control function at all. */ function ctype_print_utf(string $string): bool { return preg_match('/[[:cntrl:]]/', $string) === 0; } $items = ["Curaçao", "Curaçao\n"]; foreach ($items as $item) { var_dump($item, ctype_print_utf($item)); }
You have javascript disabled. You will not be able to edit any code.