[php-src] PR #11254: make FILE_ constants not collide with LOCK_

From: Date: Wed, 17 May 2023 08:09:58 +0000
Subject: [php-src] PR #11254: make FILE_ constants not collide with LOCK_
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-22526@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/11254 Author: divinity76 Ultimately i wish to make LOCK_SH usable in file_get_contents. With baby steps, i think the first step is to make sure FILE_USE_INCLUDE_PATH does not collide with LOCK_SH (which, prior to this patch, it does) it's annoying to have to write ``` $fp = fopen("file","rb"); flock($fp, LOCK_SH); $content = stream_get_contents($fp); flock($fp, LOCK_UN); fclose($fp); ``` when all i want to write is $content = file_get_contents("file", LOCK_SH); also it's really weird that file_put_contents support LOCK_EX but file_get_contents does not support LOCK_SH.

« previous php.git-pulls (#22526) next »