1--TEST-- 2Bug #65272: flock() correctly sets wouldblock out param in windows 3--SKIPIF-- 4<?php 5if (stripos(PHP_OS, 'win') !== 0) die("skip windows required"); 6?> 7--FILE-- 8<?php 9 10$file = dirname(__FILE__)."/flock_bug65272.dat"; 11 12$fp1 = fopen($file, "w"); 13var_dump(flock($fp1, LOCK_SH)); 14 15$fp2 = fopen($file, "r"); 16var_dump(flock($fp2, LOCK_EX|LOCK_NB, $wouldblock)); 17var_dump($wouldblock); 18 19echo "Done\n"; 20?> 21--CLEAN-- 22<?php 23$file = dirname(__FILE__)."/flock_bug65272.dat"; 24unlink($file); 25?> 26--EXPECTF-- 27bool(true) 28bool(false) 29int(1) 30Done 31