Skip to content

Commit 6cc453b

Browse files
committed
revert cs change
1 parent 285325c commit 6cc453b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

benchmark/benchmark.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,8 @@ function runValgrindPhpCgiCommand(
150150
* @return decimal-int-string
151151
*/
152152
function extractInstructionsFromValgrindOutput(string $output): string {
153-
if (!preg_match("(==[0-9]+== Events : Ir\n==[0-9]+== Collected : (?<instructions>[0-9]+))", $output, $matches)) {
154-
throw new \Exception('Unexpected valgrind output');
155-
}
156-
157-
return $matches['instructions'];
153+
preg_match("(==[0-9]+== Events : Ir\n==[0-9]+== Collected : (?<instructions>[0-9]+))", $output, $matches);
154+
return $matches['instructions'] ?? throw new \Exception('Unexpected valgrind output');
158155
}
159156

160157
main();

0 commit comments

Comments
 (0)