Skip to content

Commit 222e193

Browse files
Improve usage example
1 parent b4ed925 commit 222e193

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ To add this package as a local, per-project dependency to your project, simply a
2828
```php
2929
use SebastianBergmann\Diff;
3030

31-
$diff = new Diff("--- expected\n+++ actual\n");
32-
$diff->diff($expected, $actual);
31+
$diff = new Diff;
32+
print $diff->diff('foo', 'bar');
3333
```
34+
35+
The code above yields the output below:
36+
37+
--- Original
38+
+++ New
39+
@@ @@
40+
-foo
41+
+bar

0 commit comments

Comments
 (0)