3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fileContent = '12em\n1.3 em'; preg_replace_callback('/([0-9,-\.]+)\s*(em)/', 'replace_em', $fileContent); function replace_em($value) { return $value * 123; }

preferences:
35.74 ms | 402 KiB | 5 Q