Created
May 15, 2010 14:19
-
-
Save co3k/402212 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = "it\0contains\0null"; | |
file_put_contents('/tmp/01', $input); | |
$output = file_get_contents('/tmp/01'); | |
var_dump($output === $input, $output); | |
/* | |
期待する結果: bool(true) string(16) "itcontainsnull" | |
とある状況下での環境(まだ未特定): bool(false) string(18) "it\0contains\0null" | |
(/tmp/01 の内容自体は意図したとおりの模様) | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment