PHPackages                             paragonie/stern - 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. paragonie/stern

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

paragonie/stern
===============

Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code

v1.0.1(5y ago)201.5k11MITPHPPHP ^7|^8CI failing

Since May 3Pushed 4y ago4 watchersCompare

[ Source](https://github.com/paragonie/stern)[ Packagist](https://packagist.org/packages/paragonie/stern)[ RSS](/packages/paragonie-stern/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (1)

Stern
=====

[](#stern)

[![Build Status](https://github.com/paragonie/stern/actions/workflows/ci.yml/badge.svg)](https://github.com/paragonie/stern/actions)[![Latest Stable Version](https://camo.githubusercontent.com/0a321b14d6fef3d79a4092a5b25eab6037ce0d0e254d6c52de3bb9ab4a604683/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f737465726e2f762f737461626c65)](https://packagist.org/packages/paragonie/stern)[![Latest Unstable Version](https://camo.githubusercontent.com/a34dbf37ae5da725fcb6d231833d287ce6efda427b083b3ae9d5cbd723986d2b/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f737465726e2f762f756e737461626c65)](https://packagist.org/packages/paragonie/stern)[![License](https://camo.githubusercontent.com/8ca813a0e89d5a584c69fb8bbf57e8ae8dcaeaa829a76acd4767837f7876f2e5/68747470733a2f2f706f7365722e707567782e6f72672f70617261676f6e69652f737465726e2f6c6963656e7365)](https://packagist.org/packages/paragonie/stern)

Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code.

**Requires PHP 7+**

Usage
-----

[](#usage)

Using Stern is simply:

1. Make your class use the `SternTrait`.
2. Rename your methods from `whateverName` to `strictWhateverName`.
3. Enjoy strict-typing whether your users like it or not.

Example
-------

[](#example)

```
