3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $value = 1000; $number = ""; if( $value >= 1000 ) { $number .= floor($value / 1000) . "k"; } else { $number .= $value; } echo $number . " views";
based on geutg
Output for 4.3.0 - 7.1.0
1k views