Skip to content

Commit 340fa88

Browse files
committed
README.md updated
1 parent 4d45d87 commit 340fa88

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,27 @@
77
[![Code Coverage](https://scrutinizer-ci.com/g/s3b4stian/linna-array/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/s3b4stian/linna-array/?branch=master)
88
[![StyleCI](https://styleci.io/repos/93407083/shield?branch=master&style=flat)](https://styleci.io/repos/93407083)
99

10-
## About this package
11-
Typed arrays for php
10+
## Typed arrays for php
11+
Provide typed arrays for php as extension of native [ArrayObject](http://php.net/manual/en/class.arrayobject.php)
12+
13+
## Requirements
14+
This package require php 7.
15+
16+
## Installation
17+
With composer:
18+
```
19+
composer require s3b4stian/linna-array
20+
```
21+
22+
## Usage
23+
```php
24+
use Linna\intArray;
25+
26+
//correct, only int passed to array.
27+
$array = new intArray([1,2,3,4]);
28+
$array[] = 5;
29+
30+
//throw TypeError.
31+
$array = new intArray([1,'a',3,4]);
32+
$array[] = 'a';
33+
```

0 commit comments

Comments
 (0)