1 | <?php |
||
12 | class UseCast implements PassFunctionCallInterface |
||
13 | { |
||
14 | protected $map = array( |
||
15 | 'boolval' => 'bool', |
||
16 | 'intval' => 'int', |
||
17 | 'floatval' => 'double', |
||
18 | 'doubleval' => 'double', |
||
19 | 'strval' => 'string' |
||
20 | ); |
||
21 | |||
22 | public function visitPhpFunctionCall(FuncCall $funcCall, Context $context) |
||
45 | } |
||
46 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: