If you set the threshold to '4' and the number is '10', then you will get back '0010'. If you set the threshold to '4' and the number is '5000', then you will get back '5000'. Uses sprintf to append the amount of zeros based on the $threshold parameter and the size of the number. If the number is large enough, then no zeros will be appended.
Parameters
$numberint
Number to append zeros to if not greater than threshold.
$thresholdint
Digit places number needs to be to not have zeros added.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/formatting.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.