PHPackages                             vgalvoso/phunctional - 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. [Framework](/categories/framework)
4. /
5. vgalvoso/phunctional

ActiveLibrary[Framework](/categories/framework)

vgalvoso/phunctional
====================

PHP functional framework

v1.0.1(11mo ago)120MITPHPCI passing

Since Jul 7Pushed 11mo ago1 watchersCompare

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

READMEChangelog (8)DependenciesVersions (8)Used By (0)

PHunctional PHP
===============

[](#phunctional-php)

**Functional PHP Framework**

Introduction
------------

[](#introduction)

PHunctional PHP is a functional PHP framework.

Today's development uses complicated or too much abstraction of codes, it doesn't have to be that way.

Doesn't it cool to easily know what the code does in one look?

Doesn't it cool to focus on the output rather than wasting your time on technical stuffs?

Doesn't it cool to use a framework immediately without overwhelming configurations and dependencies?

This is what PHunctional PHP is all about.

Structure
---------

[](#structure)

Here is the basic directory structure of PHunctional PHP.

```
api/
lib/
    Database.php
    DotEnv.php
    Helper.php
    Sql.php
public/
    css/
    js/
    res/
routes/
    api.php
    view.php
view/
section/
    header.php
    footer.php
.env
.htaccess
index.php
README.md

```

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

[](#installation)

Download the latest version and extract it on your web server's root folder.

Then rename the extracted root folder into your project's name.

Or use composer:

```
composer create-project vgalvoso/phunctional your_project_name
```

After extracting or creating your project, open a terminal in your project directory and run:

```
composer install
```

This will initialize Composer to let you add dependencies when needed.

Build Your First App
--------------------

[](#build-your-first-app)

Hello World! Yes, let's create your first hello world using PHunctional PHP.

After you download and extract the latest version (see installation), create a PHP file inside the `view` folder and name it `hello_world.php`.

Let's assume you named your root folder "helloworld", this is what your project directory might look like.

[![Helloworld directory](https://raw.githubusercontent.com/vgalvoso/phunctional-php/refs/heads/master/public/res/img/hello_world.png)](https://raw.githubusercontent.com/vgalvoso/phunctional-php/refs/heads/master/public/res/img/hello_world.png)

Copy and paste this code inside `hello_world.php`:

```

Hello World!

```

Open `routes/web.php` and add a new view route. Your `routes/web.php` should look something like this:

```
