Documenting sscanf()'s and fscanf's underflow

From: Date: Sun, 24 May 2026 20:38:16 +0000
Subject: Documenting sscanf()'s and fscanf's underflow
Groups: php.internals 
Request: Send a blank email to internals+get-131005@lists.php.net to get a copy of this message
Hi all, may I request that the documentation pages for sscanf() and fscanf() be reviewed? Last week, I tripped over a bug in my code because, despite using and loving sscanf() for many years, the function unexpectedly returned -1 for the number of successful captures when I expected 0. I've documented the encounter here: https://stackoverflow.com/q/79942833/2943403 I have been doing a fair amount of Google searching, but either my keywords are not ideal or there really is no mention of this floating around (even the C++ pages that I read don't mention it). Thanks, mickmackusa

« previous php.internals (#131005) next »