PHPackages                             nunomaduro/yorn - 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. nunomaduro/yorn

ActiveLibrary

nunomaduro/yorn
===============

Modules in PHP with the `import` and `export` syntax.

14336[2 issues](https://github.com/nunomaduro/yorn/issues)PHP

Since Nov 21Pushed 4y ago4 watchersCompare

[ Source](https://github.com/nunomaduro/yorn)[ Packagist](https://packagist.org/packages/nunomaduro/yorn)[ RSS](/packages/nunomaduro-yorn/feed)WikiDiscussions feat/first Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 [![Yorn Preview](https://raw.githubusercontent.com/nunomaduro/yorn/feat/first/docs/banner.png)](https://raw.githubusercontent.com/nunomaduro/yorn/feat/first/docs/banner.png)

 [![Build Status](https://camo.githubusercontent.com/aa4d02ba86f77575bf31ee351a6375963372e1632c67a10f93c09591bff56b72/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6e756e6f6d616475726f2f796f726e2f6d61737465722e737667)](https://travis-ci.org/nunomaduro/yorn) [![Total Downloads](https://camo.githubusercontent.com/a1df82e483b6eb9987585d1f0e7e199a3b63a79ff1184b9470b92b4d7fec3228/68747470733a2f2f706f7365722e707567782e6f72672f6e756e6f6d616475726f2f796f726e2f642f746f74616c2e737667)](https://packagist.org/packages/nunomaduro/yorn) [![Latest Version](https://camo.githubusercontent.com/3fa2764b3d478831a61d7016daec8fb9c8897f8dfe3e6e694b8b08d82d9ce916/68747470733a2f2f706f7365722e707567782e6f72672f6e756e6f6d616475726f2f796f726e2f762f737461626c652e737667)](https://packagist.org/packages/nunomaduro/yorn) [![License](https://camo.githubusercontent.com/abff097b1c7873b4d3e84d55ff819e7e3008b9880bb688498f844299d828c52a/68747470733a2f2f706f7365722e707567782e6f72672f6e756e6f6d616475726f2f796f726e2f6c6963656e73652e737667)](https://packagist.org/packages/nunomaduro/yorn)

 **Modules in PHP with the `import` and `export` syntax.**

**Yorn** was carefully crafted to introduce the support for modules in **PHP** with the `import` and `export` syntax. It was created by **[Nuno Maduro](https://github.com/nunomaduro)**.

Before the quick start, keep in mind that a module usually contains a collection of functions, and those functions are small units of independent, reusable code that is desired to be used as the building blocks in creating a PHP application.

As example, this is how a typical **Yorn** application would look like:

```
# src/math/sum.php:
