3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $price = 987536453; $last_digit = substr($price, -1, 1); echo $last_digit."<br />\n"; $price = substr_replace($price, "", -1, 1); $price = chunk_split($price, 2, ",").$last_digit; echo $price;
Output for 5.6.38 - 7.3.0rc3
3<br /> 98,75,36,45,3