jonbaldie / functions
A skeleton PHP project based on the principles of functional programming and pure functions.
Requires
- php: >=8.1
- ext-mbstring: *
- ext-openssl: *
- ext-pdo: *
- ext-sodium: *
Requires (Dev)
- phan/phan: ^5.3
- phpunit/phpunit: ^9.5
- rskuipers/php-assumptions: ^0.8.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v2.0.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-fix/issue-44-core-js
- dev-agent/issue-41-regression
- dev-agent/issue-41-route-normalization
- dev-fix/issue-34-entrypoint
- dev-explore/functions-20261029
- dev-fix/issue-20-static-handoff
- dev-fix/issue-18-empty-uri
- dev-codex/functions-ci-badge
- dev-codex/functions-github-actions
- dev-cursor/cloud-agent-setup-notes-0ffa
- dev-readme-edit
- dev-travis-patch
- dev-yarn-install
- dev-composer-update
This package is auto-updated.
Last update: 2026-10-31 00:32:13 UTC
README
PHP Functional Programming Skeleton Project
Functions is a PHP skeleton project built upon a foundation of pure functions. It's a fun personal project of mine but it is unit tested and stable, if you'd like to give it a go.
Just run this to get started:
composer create-project jonbaldie/functions my-project && cd my-project
Then to generate your front-end assets:
yarn install && yarn encore dev
Start a local PHP server:
cd public && php -S localhost:3000 index.php
Open http://localhost:3000 and you should see "It works!"
See the skeleton exploratory pass for setup and routing observations.
Wait, what's a "pure function"?
Pure functions map variables from an input and produce an output, with no observable side-effects. They're easily testable, can be moved anywhere, and used in any context with no unexpected effects. This concept comes from functional programming languages like Clojure, Scala, or Haskell.
Functional programming - an approach that holds pure functions at its core - is growing in popularity. Developers are challenging the utility of traditional methods that run the risk of producing code that's difficult to debug. What's simpler than a pure function that does nothing more than map an input to an output?