File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
# 3.x -> 4.0
2
2
3
- Below you can find list of changes between 3.x and 4.0 versions of PHPMatcher.
4
-
5
- ### Creating Matcher
3
+ Below you can find list of changes between ` 3.x ` and ` 4.0 ` versions of PHPMatcher.
6
4
5
+ ** Creating Matcher:**
7
6
``` diff
8
7
- $factory = new MatcherFactory();
9
- - $this->matcher = $factory->createMatcher();
10
- ```
11
-
12
- ``` diff
13
- + $this->matcher = new PHPMatcher();
8
+ - $matcher = $factory->createMatcher();
9
+ + $matcher = new PHPMatcher();
14
10
```
15
11
16
- ### Simple Matching
17
-
12
+ ** Using Matcher**
18
13
``` diff
19
14
- PHPMatcher::match($value, $pattern, $error)
15
+ + $matcher = (new PHPMatcher())->match($value, $pattern);;
20
16
```
21
17
18
+ ** Accessing last error/backtrace**
22
19
``` diff
23
20
+ $matcher = new PHPMatcher();
24
21
+ $matcher->match($value, $pattern);
25
22
+ echo $matcher->error();
23
+ + echo $matcher->backtrace();
26
24
```
You can’t perform that action at this time.
0 commit comments