PHPackages                             tkotosz/fn-fdk-php - 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. tkotosz/fn-fdk-php

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

tkotosz/fn-fdk-php
==================

PHP Function Development Kit for Fn

1.0.2(7y ago)624MITPHPPHP &gt;=7.1

Since Jan 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tkotosz/fn-fdk-php)[ Packagist](https://packagist.org/packages/tkotosz/fn-fdk-php)[ RSS](/packages/tkotosz-fn-fdk-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

PHP Fn Development Kit (FDK)
============================

[](#php-fn-development-kit-fdk)

fn-fdk-go provides convenience functions for writing php [fn](https://github.com/fnproject/fn) code

Installing fn-fdk-php
---------------------

[](#installing-fn-fdk-php)

You can install it manually with composer:

```
composer require tkotosz/fn-fdk-php

```

Or just use the [php init image](https://github.com/tkotosz/fn-php-init) to create new funtion like this:

```
fn init --init-image tkotosz/fn-php-init myfunc

```

This will generate the necessary files for your function including the composer json and docker file to install this fdk.

Creating a PHP Function
-----------------------

[](#creating-a-php-function)

Writing a PHP function is simply a matter of writing a handler function that you pass to the FDK to invoke each time your function is called.

Start by creating a php function with `fn init`:

```
fn init --init-image tkotosz/fn-php-init phpfunc
cd phpfunc
```

This creates a simple hello world function in `func.php`:

```
