Git Product home page Git Product logo

yaf-php-example's Introduction

Yaf-php Example Project

http://uk.php.net/manual/en/book.yaf.php

This is a full-ish example Yaf application implementing:

  • Zend-like folder structure
  • Error Controller
  • Third Party libraries (zend_db)
  • Routing
  • Plugins (to achieve layout wrapper view)
  • Registry

Requirements:

  • PHP 5.3+
  • Yaf Extension Installed/Enabled
  • PDO (sqlite)
  • .htaccess must be enabled

Useful:

  • Sqliteman (Linux) / Sqlite Administrator (Windows)

Example Development Apache Vhost:

    #ensure vhosts are enabled
    NameVirtualHost *:80

    #the vhost
    <VirtualHost *:80>
        DocumentRoot [project dir]/public
        ServerName yaf.dev #or whatever
    </VirtualHost>

Set you hosts file to:

    127.0.0.1   yaf.dev #or whatever

Set the environment in you php.ini by adding this to the bottom:

    [yaf]
    yaf.environ=devel

Benchmark

To see the equivilent benchmart for Zend see:

https://github.com/warmans/Yaf-PHP-Example-ZendEquiv

Server Software:        Apache/2.2.21
Server Hostname:        yaf.dev
Server Port:            80

Document Path:          /
Document Length:        3314 bytes

Concurrency Level:      5
Time taken for tests:   10.931 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      3509000 bytes
HTML transferred:       3314000 bytes
Requests per second:    91.49 [#/sec] (mean)
Time per request:       54.653 [ms] (mean)
Time per request:       10.931 [ms] (mean, across all concurrent requests)
Transfer rate:          313.50 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       0
Processing:    15   54  10.9     53     114
Waiting:       15   48  12.0     47     114
Total:         15   55  10.9     53     114

Percentage of the requests served within a certain time (ms)
  50%     53
  66%     56
  75%     58
  80%     61
  90%     66
  95%     74
  98%     89
  99%     96

yaf-php-example's People

Contributors

warmans avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.