Page MenuHomePhabricator

Add a `phutil_count` function
ClosedPublic

Authored by joshuaspence on Sep 6 2015, 4:52 AM.
Tags
None
Referenced Files
F19499835: D14070.diff
Thu, Jan 8, 2:02 PM
F19499346: D14070.diff
Thu, Jan 8, 1:47 PM
F19499168: D14070.diff
Thu, Jan 8, 1:40 PM
F19498745: D14070.diff
Thu, Jan 8, 1:17 PM
F19498622: D14070.diff
Thu, Jan 8, 1:14 PM
F18962177: D14070.diff
Nov 13 2025, 3:51 PM
F18861496: D14070.id34714.diff
Nov 2 2025, 3:51 PM
F18855116: D14070.id34720.diff
Nov 1 2025, 3:22 AM
Subscribers

Details

Summary

This function is a shorthand for new PhutilNumber(count($x)).

Test Plan

See next diff.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Add a `phutil_number` function.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
avivey retitled this revision from Add a `phutil_number` function to Add a `phutil_count` function.Sep 6 2015, 5:18 AM
avivey edited edge metadata.
epriestley edited edge metadata.

Maybe pht_count()?

Maybe let it take take an integer too?

src/internationalization/pht.php
26

Function spelled wrong (phnutil should be phutil).

This revision is now accepted and ready to land.Sep 6 2015, 3:05 PM
joshuaspence marked an inline comment as done.
joshuaspence edited edge metadata.

Fix typo

This revision was automatically updated to reflect the committed changes.