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; }
Output for 7.1.0 - 7.2.6
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 - 7.0.20
1476\n159.9