Run Rector on your code to see what it can do for you:
{ $string = 'keys=1000'; - $this->assertSame(1, preg_match('/^keys=(?P<count>\d+)/', $string, $matches)); + $this->assertRegExp('/^keys=(?P<count>\d+)/', $string); $this->assertSame(1000, (int) $matches['count']); } }
Applied Rules:
Not a change you expect?
rector.php