File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 7
7
[ ![ 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 )
8
8
[ ![ StyleCI] ( https://styleci.io/repos/93407083/shield?branch=master&style=flat )] ( https://styleci.io/repos/93407083 )
9
9
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
+ ```
You can’t perform that action at this time.
0 commit comments