Run Rector on your code to see what it can do for you:

 {
     public function run(string $param)
     {
-        return preg_match('/^[0-9]+$/', $param);
+        return preg_match('/^d+$/', $param);
     }
 }
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: 367edb - released at 2026-01-28 17:10