3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $precoBase = (float)71612.54; $sumLotes= array_sum(array((float)4568.20,(float)26370.24,(float)13986.00,(float)1745.60,(float)18295.00,(float)6647.50)); if ($preco === $sum) { // Comparing value and data type. echo 'OK'; }else{ echo 'LOLPHP - NOK' . PHP_EOL; var_dump($precoBase,$sumLotes); }
Output for 5.0.4 - 5.0.5, 7.0.0 - 7.2.0
Notice: Undefined variable: preco in /in/IoHKC on line 6 Notice: Undefined variable: sum in /in/IoHKC on line 6 OK
Output for 5.1.0 - 5.6.28
Notice: Undefined variable: sum in /in/IoHKC on line 6 Notice: Undefined variable: preco in /in/IoHKC on line 6 OK
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: preco in /in/IoHKC on line 6 Notice: Undefined variable: sum in /in/IoHKC on line 6 OK