1--TEST-- 2Bug #78862 (link() silently truncates after a null byte on Windows) 3--FILE-- 4<?php 5file_put_contents(__DIR__ . '/bug78862.target', 'foo'); 6var_dump(link(__DIR__ . "/bug78862.target\0more", __DIR__ . "/bug78862.link\0more")); 7var_dump(file_exists(__DIR__ . '/bug78862.link')); 8?> 9--EXPECTF-- 10Fatal error: Uncaught ValueError: link(): Argument #1 ($target) must not contain any null bytes in %s:%d 11Stack trace: 12#0 %s(%d): link('%s', '%s') 13#1 {main} 14 thrown in %s on line %d 15--CLEAN-- 16<?php 17unlink(__DIR__ . '/bug78862.target'); 18?> 19