PHPackages                             dnmvcs/framework - 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. dnmvcs/framework

Abandoned → [dvaknheo/duckphp](/?search=dvaknheo%2Fduckphp)Library[Framework](/categories/framework)

dnmvcs/framework
================

A Framework in 2018

v1.3.4(1mo ago)135449[8 issues](https://github.com/dvaknheo/duckphp/issues)1MITPHPPHP &gt;=7.4.0CI failing

Since Nov 20Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/dvaknheo/duckphp)[ Packagist](https://packagist.org/packages/dnmvcs/framework)[ Docs](https://www.github.com/dvaknheo/duckphp)[ RSS](/packages/dnmvcs-framework/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (33)Used By (1)

DuckPhp
=======

[](#duckphp)

[English](README.md) | [中文](README-zh.md)

- Version: v1.3.4 / preparing for v1.3.5
- Author QQ: 85811616
- QQ Group: 714610448

Gitee repository: Github repository:

1. What is DuckPhp
------------------

[](#1-what-is-duckphp)

DuckPhp is a library-style PHP framework. It has no dependencies, every component can be replaced, and it is flexible for deployment and teamwork.

The name comes from **duck typing**:

> Duck Typing: if it looks like a duck, swims like a duck, and quacks like a duck, then it is probably a duck.

2. Features
-----------

[](#2-features)

### Install with Composer

[](#install-with-composer)

```
composer require dvaknheo/duckphp # use require
./vendor/bin/duckphp new

```

The first command shows that DuckPhp is a library-style framework, not a bundle of many libraries.

**DuckPhp is added as a library.** So the project skeleton does not contain a lot of files that you cannot delete.

**DuckPhp has no dependencies.** You do not need to worry about changes in third-party packages. It works without importing 101 packages, so stability is fully under control.

The command `./vendor/bin/duckphp new` copies the skeleton files and replaces the project namespace with the `src` namespace you set in `composer.json`.

**DuckPhp does not limit your project namespace.**

You can also write code without the skeleton files.

### Example 1

[](#example-1)

#### Create the Example

[](#create-the-example)

We use a simple example to quickly understand DuckPhp.

Create a file `sample1.php` in the project directory:

```
