3v4l.org

run code in 150+ 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; }
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/WFHVS on line 6 Notice: A non well formed numeric value encountered in /in/WFHVS on line 6 1476\n159.9
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.14
1476\n159.9