Skip to content

Commit f944b79

Browse files
committed
Update README.md
1 parent 58a6348 commit f944b79

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ public function testGetToys()
7070

7171
From now you should be able to use global function ``match($value, $pattern)``
7272

73+
### Available patterns
74+
75+
* ``@string@``
76+
* ``@integer@``
77+
* ``@boolean@``
78+
* ``@array@``
79+
* ``@...@`` - *unbounded array*
80+
* ``@double@``
81+
* ``@null@``
82+
* ``@*@`` || ``@wildcard@``
83+
* ``expr(expression)``
84+
7385
##Example usage
7486

7587
### Scalar matching
@@ -130,6 +142,12 @@ match(
130142
'firstName' => 'Michał',
131143
'lastName' => 'Dąbrowski',
132144
'roles' => array('ROLE_USER')
145+
),
146+
array(
147+
'id' => 3,
148+
'firstName' => 'Johnny',
149+
'lastName' => 'DąbrowsBravoki',
150+
'roles' => array('ROLE_HANDSOME_GUY')
133151
)
134152
),
135153
true,
@@ -148,7 +166,8 @@ match(
148166
'firstName' => '@string@',
149167
'lastName' => 'Dąbrowski',
150168
'roles' => '@array@'
151-
)
169+
),
170+
'@...@'
152171
),
153172
'@boolean@',
154173
'@double@'

0 commit comments

Comments
 (0)