PHPackages                             uffe-code/word-count - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. uffe-code/word-count

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uffe-code/word-count
====================

PHP port of the Javascript iarna/word-count

1.0.0(2y ago)011.7k↓50%MITPHPPHP &gt;=8.2

Since Apr 8Pushed 2y agoCompare

[ Source](https://github.com/Uffe-Code/word-count)[ Packagist](https://packagist.org/packages/uffe-code/word-count)[ Fund](https://paypal.me/MisfitMaid)[ Patreon](https://www.patreon.com/MisfitMaid)[ RSS](/packages/uffe-code-word-count/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

word-count
==========

[](#word-count)

PHP port of [sylae/word-count](https://github.com/sylae/word-count). This *should* provide an accurate wordcount taking into account apostrophes and hyphens and stuff. See iarna's project for disclaimers on what languages this method may not work well with.

Usage
-----

[](#usage)

`composer require uffe-code/word-count`

```
