Skip to content

Commit ca35f96

Browse files
authored
Change README.md for adding more examples (#16)
1 parent 493e68b commit ca35f96

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,19 @@ Supported types:
3333
```php
3434
use Coduo\ToString\StringConverter;
3535

36+
$string = new StringConverter('foo');
37+
echo $string; // "foo"
38+
3639
$double = new StringConverter(1.12312);
3740
echo $double; // "1.12312"
3841

42+
$integer = new StringConverter(1);
43+
echo $integer; // "1"
44+
3945
$datetime = new StringConverter(new \DateTime());
4046
echo $datetime; // "\DateTime"
4147

42-
$array = new StringConverter(array('foo', 'bar', 'baz'));
48+
$array = new StringConverter(['foo', 'bar', 'baz']);
4349
echo $array; // "Array(3)"
4450

4551
$res = fopen(sys_get_temp_dir() . "/foo", "w");

0 commit comments

Comments
 (0)