1--TEST-- 2Bug #77552 Uninitialized php_stream_statbuf in stat functions 3--SKIPIF-- 4<?php 5if (substr(PHP_OS, 0, 3) != 'WIN') { 6 die('skip windows only test'); 7} 8?> 9--FILE-- 10<?php 11// Check lstat on a Windows junction to ensure that st_mode is zero 12$tmpDir = __DIR__.'/test-bug77552'; 13 14$target = $tmpDir.'/folder/target'; 15mkdir($target, 0777, true); 16 17$junction = $tmpDir.'/junction'; 18$cmd = sprintf('mklink /J "%s" "%s"', $junction, $target); 19exec($cmd); 20 21$stat = lstat($junction); 22var_dump($stat['mode']); 23 24?> 25--CLEAN-- 26<?php 27$tmpDir = __DIR__.'/test-bug77552'; 28$cmd = sprintf('rmdir /S /Q "%s"', $tmpDir); 29exec($cmd); 30?> 31--EXPECT-- 32int(0) 33