File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -19,22 +19,25 @@ Supported types:
19
19
* string
20
20
* integer
21
21
* float/double
22
- * objec
22
+ * object
23
+ * callback
23
24
* array
24
25
* resource
25
26
26
27
``` php
27
- $double = new \Coduo\ToString\String(1.12312);
28
+ use Coduo\ToString\String;
29
+
30
+ $double = new String(1.12312);
28
31
echo $double; // "1.12312"
29
32
30
- $datetime = new \Coduo\ToString\ String(new \DateTime());
33
+ $datetime = new String(new \DateTime());
31
34
echo $datetime; // "\DateTime"
32
35
33
- $array = new \Coduo\ToString\ String(array('foo', 'bar', 'baz'));
36
+ $array = new String(array('foo', 'bar', 'baz'));
34
37
echo $array; // "Array(3)"
35
38
36
39
$res = fopen(sys_get_temp_dir() . "/foo", "w");
37
- $resource = new \Coduo\ToString\ String($res);
40
+ $resource = new String($res);
38
41
echo $resource; // "Resource(stream)"
39
42
40
43
```
You can’t perform that action at this time.
0 commit comments