👻 Furbland's Very Spooky Account™ 👻 on Nostr: #PHP developers: does anyone know how to replace one line of a large (~8GB) file with ...
#PHP developers: does anyone know how to replace one line of a large (~8GB) file with a different line that may be larger or shorter than the one it's replacing. i'd prefer to NOT have to load it into memory as an array or whatever as that's going to be intensive and edits to this file will be happening relatively frequently and i'd like to be able to use standard PHP file operations so I can lock and queue requests
any ideas? thanks! :)
Published at
2026-07-26 08:33:19 UTCEvent JSON
{
"id": "465e3e88340801b8f93277c7168aa47882cb18b1e2fa44b31495bc008eb9e616",
"pubkey": "58aeee4a206e3f8ccad2842b2b352b6b11b703649cf731120da84d8cae61f076",
"created_at": 1785054799,
"kind": 1,
"tags": [
[
"t",
"php"
],
[
"proxy",
"https://mastodon.social/users/GroupNebula563/statuses/116985351308625014",
"activitypub"
],
[
"client",
"Mostr",
"31990:6be38f8c63df7dbf84db7ec4a6e6fbbd8d19dca3b980efad18585c46f04b26f9:mostr",
"wss://relay.ditto.pub"
]
],
"content": "#PHP developers: does anyone know how to replace one line of a large (~8GB) file with a different line that may be larger or shorter than the one it's replacing. i'd prefer to NOT have to load it into memory as an array or whatever as that's going to be intensive and edits to this file will be happening relatively frequently and i'd like to be able to use standard PHP file operations so I can lock and queue requests\n\nany ideas? thanks! :)",
"sig": "3951b05e63d5e8739cb72fd01141ac7962288e182f014c175d2797b02331486586b1b85dc3f45181fbaa7dcac1318a614c9b8a05a8d15906772e54ef63e0efdd"
}