Skip to content

Instantly share code, notes, and snippets.

@co3k
Created May 15, 2010 14:19
Show Gist options
  • Save co3k/402212 to your computer and use it in GitHub Desktop.
Save co3k/402212 to your computer and use it in GitHub Desktop.
<?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