3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = "car -12 and dog 3.1416 and cat 98 and 4,12 and flowers = 0.1 and -75"; echo "EXPECT: car NUM and dog NUM and cat NUM and NUM and flowers = NUM and NUM\n"; echo "OUTPUT: ",preg_replace('~-?\d*[,.]?\d+~','NUM',$txt);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
152.18 ms | 2218 KiB | 9 Q