PHPackages                             johnnymast/morsecode - 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. johnnymast/morsecode

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

johnnymast/morsecode
====================

Encode or decode your morsecode messages with this package

v1.2.1(7y ago)1113421MITPHPCI failing

Since Apr 9Pushed 7y ago2 watchersCompare

[ Source](https://github.com/johnnymast/morsecode)[ Packagist](https://packagist.org/packages/johnnymast/morsecode)[ RSS](/packages/johnnymast-morsecode/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

[![Build Status](https://camo.githubusercontent.com/30d116b59e55c10baf49933b2f6126c44ce4bc1e7916efebb235bd6091389790/68747470733a2f2f7472617669732d63692e6f72672f6a6f686e6e796d6173742f6d6f727365636f64652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/johnnymast/morsecode)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0764db659ec1cac643620a873867c87cd526305ec985b226e1b96f34ddeff2db/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a6f686e6e796d6173742f6d6f727365636f64652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/johnnymast/morsecode/?branch=master)

Morsecode
=========

[](#morsecode)

This package allows you to encode or decode morsecode messages.

Encoding
--------

[](#encoding)

If you wish to encode your message you can use the encode method.

```
use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode();
echo $morse->encode('This is a test');
```

Decoding
--------

[](#decoding)

If you wish to decode your message you can use the decode method.

```
use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode();
echo $morse->decode('- .... .. ... / .. ... / .- / - . ... -');
```

Alternative methods
-------------------

[](#alternative-methods)

You can also pass the message you wish you encode or decode via the constructor of the class like so.

```
use johnnymast\Morsecode\Morsecode;

$morse = new Morsecode('This is a test');
echo $morse->encode();
```

Return values
-------------

[](#return-values)

The encode and decode methods could return en empty string if no translation could be made. So please take note of this.

Installation
------------

[](#installation)

Using [composer](http://www.getcompser.com):

```
$ composer require johnnymast/morsecode
```

Requirements
------------

[](#requirements)

The following versions of PHP are supported by this version.

- PHP &gt;= 7.0
- HHVM

Development Requirements
------------------------

[](#development-requirements)

- PHPUnit 5.7

Author
------

[](#author)

This package is created and maintained by [Johnny Mast](https://github.com/johnnymast). If you have any questions feel free to contact me on twitter by using [@mastjohnny](https://twitter.com/intent/tweet?text=@mastjohnny) in your tweet.

License
-------

[](#license)

MIT License

Copyright (c) 2019 Johnny Mast

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 96.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~241 days

Total

4

Last Release

2646d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5a228d3118e6b9e3c3c189ea1c8d3a13ed4c9ac312b9217654c81f6d4214cc8?d=identicon)[johnnymast](/maintainers/johnnymast)

---

Top Contributors

[![johnnymast](https://avatars.githubusercontent.com/u/121194?v=4)](https://github.com/johnnymast "johnnymast (53 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

armycommunicationdecoderencodermorsemorse-codephpencodedecodecommunicationdecodermorsearmy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/johnnymast-morsecode/health.svg)

```
[![Health](https://phpackages.com/badges/johnnymast-morsecode/health.svg)](https://phpackages.com/packages/johnnymast-morsecode)
```

###  Alternatives

[dflydev/base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

14400.6k1](/packages/dflydev-base32-crockford)[kunststube/rison

A PHP encoder and decoder for Rison, the compact JSON-like data format optimized for URIs.

2367.3k3](/packages/kunststube-rison)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
