[doc-en] master: docs(printf): fix incorrect cutoff value in examples (#5080)

From: Date: Sun, 11 Jan 2026 20:28:50 +0000
Subject: [doc-en] master: docs(printf): fix incorrect cutoff value in examples (#5080)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-22940@lists.php.net to get a copy of this message
Author: Anton L. (democod) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-01-11T20:28:47Z Commit: https://github.com/php/doc-en/commit/49999607f48c5e18ef3954a9c6895adbd6aec27a Raw diff: https://github.com/php/doc-en/commit/49999607f48c5e18ef3954a9c6895adbd6aec27a.diff docs(printf): fix incorrect cutoff value in examples (#5080) Changed paths: M reference/strings/functions/printf.xml Diff: diff --git a/reference/strings/functions/printf.xml b/reference/strings/functions/printf.xml index 09a913405ea7..c229680ad740 100644 --- a/reference/strings/functions/printf.xml +++ b/reference/strings/functions/printf.xml @@ -115,8 +115,8 @@ printf("[%-10s]\n", $s); // left-justification with spaces printf("[%010s]\n", $s); // zero-padding works on strings too printf("[%'#10s]\n", $s); // use the custom padding character '#' printf("[%'#*s]\n", 10, $s); // Provide the padding width as an additional argument -printf("[%10.9s]\n", $t); // right-justification but with a cutoff of 8 characters -printf("[%-10.9s]\n", $t); // left-justification but with a cutoff of 8 characters +printf("[%10.9s]\n", $t); // right-justification but with a cutoff of 9 characters +printf("[%-10.9s]\n", $t); // left-justification but with a cutoff of 9 characters ?> ]]> </programlisting>

« previous php.doc.cvs (#22940) next »