运行结果尺寸: 625 x 591
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$input = [
  "It is 5 o'clock",
  "40 days",
  "No numbers here",
  "In the year 2000"
];
$result = preg_filter('/[0-9]+/', '($0)', $input);
print_r($result);
?>
</body>
</html>
Array
(
    [0] => It is (5) o'clock
    [1] => (40) days
    [3] => In the year (2000)
)