Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed May 4, 2014
1 parent f6034a8 commit dc133bc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,25 @@ Supported types:
* string
* integer
* float/double
* objec
* object
* callback
* array
* resource

```php
$double = new \Coduo\ToString\String(1.12312);
use Coduo\ToString\String;

$double = new String(1.12312);
echo $double; // "1.12312"

$datetime = new \Coduo\ToString\String(new \DateTime());
$datetime = new String(new \DateTime());
echo $datetime; // "\DateTime"

$array = new \Coduo\ToString\String(array('foo', 'bar', 'baz'));
$array = new String(array('foo', 'bar', 'baz'));
echo $array; // "Array(3)"

$res = fopen(sys_get_temp_dir() . "/foo", "w");
$resource = new \Coduo\ToString\String($res);
$resource = new String($res);
echo $resource; // "Resource(stream)"

```

0 comments on commit dc133bc

Please sign in to comment.