3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '32.29'; $float = floatval($string); $divideByFloat = 1.21; var_dump($string/$divideByFloat); var_dump($float/$divideByFloat); $product = simplexml_load_string('<product><price><main>32.29</main></price></product>'); $string = $product->price->main; $float = floatval($product->price->main); $divideByFloat = 1.21; var_dump($string/$divideByFloat); var_dump($float/$divideByFloat);
Output for 5.0.0 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.10
float(26.685950413223) float(26.685950413223) float(26.446280991736) float(26.685950413223)
Output for 4.4.5 - 4.4.9
float(26.685950413223) float(26.685950413223) Fatal error: Call to undefined function: simplexml_load_string() in /in/l49VX on line 8
Process exited with code 255.
Output for 4.3.2 - 4.4.4
float(26.685950413223) float(26.685950413223) Fatal error: Call to undefined function: simplexml_load_string() in /in/l49VX on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
float(26.685950413223) float(26.685950413223) Fatal error: Call to undefined function: simplexml_load_string() in /in/l49VX on line 8