[php-langspec][Issue #233] - Unicode codepoints are used in the specification, but the specification does not define encoding
[email protected] Thu, 21 Feb 2019 20:19:41 +0000
| Newsgroups | php.standards |
|---|---|
| Message-ID | <[email protected]> |
You can view the Issue on github:
https://github.com/php/php-langspec/issues/233
Comment by Agares:
```
<?php
$funcName = chr(0xff).chr(0xff).chr(0xff).chr(0xff);
file_put_contents('test2.php', '<?php function '.$funcName.'() { echo \'Hi\'; } ' . $funcName . '();');
```
This generates a PHP file which is not valid UTF-8. Yet the script works, and it would be correct if we assume "U+00##" means "byte 0x##" and the spec defined its encoding as "7-bit ASCII, where 0x80 to 0xFF are allowed"