3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'fromWeightkg', 'toWeightkg', 'value', '1', '0', ); foreach ($array as $value) { var_dump(gr($value)); } function gr($str) { $str[0] = strtoupper($str[0]); }
based on N3CWH
Output for 4.3.0 - 7.1.0
NULL NULL NULL NULL NULL