| 1 | <?php |
||
| 15 | trait Str |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @param string|null $date DateTime string |
||
| 19 | * |
||
| 20 | * @return string|null DateTime in ISO8601 format |
||
| 21 | */ |
||
| 22 | public static function convertDateTime($date) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $str Snake case string |
||
| 36 | * |
||
| 37 | * @return string Camel case string |
||
| 38 | */ |
||
| 39 | public static function convertToCamelCase($str) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Convert a value to studly caps case. |
||
| 48 | * |
||
| 49 | * @param string $value |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public static function studly($value) |
||
| 59 | } |
||
| 60 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: