3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $parsedValue = trim(" 0% (0/44) "); $exploded = explode(" ",$parsedValue); $percentage = $exploded[0]; $parsedValue = trim($exploded[1], "()"); $parsedValue = explode("/", $parsedValue); $parsedValue = (float) $parsedValue[0] / $parsedValue[1]; var_dump($parsedValue);
based on qRXSE
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
float(0)