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]); return $str; }
based on NlfTN
Output for 4.3.0 - 7.1.0
string(12) "FromWeightkg" string(10) "ToWeightkg" string(5) "Value" string(1) "1" string(1) "0"