PHPackages                             php-fp/php-fp-writer - 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. php-fp/php-fp-writer

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

php-fp/php-fp-writer
====================

An implementation of the Writer monad in PHP.

9121PHP

Since Apr 18Pushed 9y agoCompare

[ Source](https://github.com/php-fp/php-fp-writer)[ Packagist](https://packagist.org/packages/php-fp/php-fp-writer)[ RSS](/packages/php-fp-php-fp-writer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

The Writer Monad for PHP. [![Build Status](https://camo.githubusercontent.com/a1b678a2db2d4e42037fab362d0203944b3e46382d681afb0fe16cc145a6b180/68747470733a2f2f7472617669732d63692e6f72672f7068702d66702f7068702d66702d7772697465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/php-fp/php-fp-writer)
=====================================================================================================================================================================================================================================================================================================================

[](#the-writer-monad-for-php-)

Intro
-----

[](#intro)

The Writer monad is used for logging within a computation. Internally, the Writer stores two values: a computation value (like any other monad), and a monoid value that stores the log. A monoid must have an `empty` value and a `concat` method:

```
