PHPackages                             tagged/out - 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. [Templating &amp; Views](/categories/templating)
4. /
5. tagged/out

ActiveLibrary[Templating &amp; Views](/categories/templating)

tagged/out
==========

Terse output functions for effortless php templating.

1.0.3(11y ago)220Apache-2.0PHP

Since Jun 5Pushed 11y ago18 watchersCompare

[ Source](https://github.com/tagged/php-out)[ Packagist](https://packagist.org/packages/tagged/out)[ RSS](/packages/tagged-out/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (5)Used By (0)

out\\text('is safer than echo')
===============================

[](#outtextis-safer-than-echo)

Motivated by the need to easily construct properly formatted php templates, the out library provides terse output functions for all HTML5 contexts: text, html, script, style and CDATA. It also ensures consistent character encoding by assuming [UTF-8 will be used everywhere](http://www.utf8everywhere.org/), and replacing (or removing) all invalid characters with the unicode replacement character, '�'.

[![Build Status](https://camo.githubusercontent.com/c169220057e0d197d1d40c544ae6cf4b50570f18fe14c61bc3ac41a1f3a97148/68747470733a2f2f7472617669732d63692e6f72672f7461676765642f7068702d6f75742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tagged/php-out)

example
-------

[](#example)

```

  ]]>

```

install
-------

[](#install)

Add to [composer.json](https://getcomposer.org/) from packagist.

```
composer require tagged/out:*

```

The out library is included with the composer autoloader.

```
require 'vendor/autoload.php';

```

usage
-----

[](#usage)

### output functions

[](#output-functions)

All output functions write directly to stdout.

#### Write html-escaped text with `out\text`

[](#write-html-escaped-text-with-outtext)

```
Hello
