3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fileContent = '12em\n1.3 em'; echo preg_replace_callback('/([0-9,-\.]+)\s*(em)/', 'replace_em', $fileContent); function replace_em($value) { return $value[0] * 123 . 'em'; }
Output for 7.1.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/LAHmC on line 6 Notice: A non well formed numeric value encountered in /in/LAHmC on line 6 1476em\n159.9em
Output for 4.3.0 - 7.0.20
1476em\n159.9em