3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'hellolleh'; function up($str) { return substr($str,0,(1+strlen($str))/2); } echo up($str);
based on QUQ8u
Output for 5.6.0 - 7.3.0alpha1
hello