Giter Club home page Giter Club logo

php-datastructures's Introduction

Redefining PHP's Standard Library: A Focus on Object-Oriented Programming

While developing and helping others develop PHP applications I noticed the trend to use PHP's arrays in nearly every task. Arrays in PHP are useful but they aren't well suited to object-oriented programming since they are not objects. I made this library to make writing object-oriented code easier.

Requirements

PHP 5.4

This project requires PHP 5.4 because it uses Traits, the callable type-hint and short-array syntax. Depending on how long this project takes to mature it might require PHP 5.5 for its generators and improved handling of non-scalar keys in Iterators.

An Autoloader

This project does not provide an autoloader. This project uses a natural 1-to-1 mapping of the class or interface name to the filesystem. This project supports the tool composer which can generate an autoloader for you.

Patience

This project is unstable and subject to significant changes from release to release. Therefore it requires that you exercise patience if you use it in your project.

Roadmap

There is no roadmap for this project. I work on it when I find something in my daily coding that could benefit this library. A few associates of mine also use this (unstable) repository and suggest changes. I intend to release version 1.0.0 when it has been successfully used in multiple projects and can commit to a stable API. Until then, minor versions will be tagged as they are deemed helpful. This project follows semantic versioning.

How can I help?

The best way to help is to use the library and submit issues when you find them. As of right now, every line in the library has been executed in a unit test*. The quality of some of these tests is poor and there are still bugs lurking around.

* Except the Trie and SplayTree classes which are experimental structures.

Can you add X structure?

Maybe. Open an issue and mark it as a feature request and I'll look into it.

Why not use the existing Standard PHP Library?

The current Standard PHP Library (SPL) has many problems, some of which are documented in an unfinished RFC regarding the SPL. I won't go into them here, but I felt I needed to give at least some reasoning for not using it.

php-datastructures's People

Contributors

c9s avatar igorw avatar ircmaxell avatar jmikola avatar morrisonlevi avatar olekukonko avatar rdlowrey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.