Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Jul 6, 2020
1 parent 3e49d08 commit 8029c01
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# CAST IN THE NAME OF PHP, YE NOT GUILTY
## ABOUT
- you can cast any values in the weak mode manner, even if you are in the strict mode (strict_types=1)

## INSTALL
```
composer require sj-i/php-cast
```

## USAGE

```
use PhpCast\Cast;
// int(1)
$int_value = Cast::toInt('1');
// string(1) "1"
$string_value = Cast::toString(1);
// float(1)
$float_value = Cast::toFloat(1);
// bool(true)
$bool_value = Cast::toBool(1);
// TypeError
$int_value = Cast::toInt('a');
```

## LICENSE
MIT

0 comments on commit 8029c01

Please sign in to comment.