Skip to content

Latest commit

 

History

History
376 lines (359 loc) · 19.2 KB

README.md

File metadata and controls

376 lines (359 loc) · 19.2 KB

English | 简体中文

Php Data Structures and Algorithms

Minimal and clean example implementations of data structures and algorithms in Php 7.2.

Contributing

Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here

Tests

Use unittest

For running all tests write down:

$ phpunit --bootstrap src/autoload.php unit_test

For running some specific tests you can do this as following (Ex: sort):

$ phpunit --bootstrap src/autoload.php unit_test/bitmap/setTest.php

Install

If you want to use the API algorithms in your code, it is as simple as:

$ composer install algorithms_php

You can test by creating a php file: (Ex: use merge_sort in sort)

use algorithms_php\sort\merge_sort

$my_list = [1, 8, 3, 5, 6];
$my_list = merge_sort($my_list);
print_r($my_list);

Uninstall

If you want to uninstall algorithms, it is as simple as:

$ composer remove -y algorithms_php

List of Implementations

Contributors

The repo is maintained by