3v4l.org

run code in 300+ PHP versions simultaneously
<?php //var dump of $params shows: array(2) { [0] => string(2) [1]=> string(7) "renault" [1]=> string(20) "Alaskan" } public function getSomething(string $sql, array $params): array { $result = array(); $statement = $this->connection->prepare($sql); $sql = "SELECT * FROM housemark WHERE merk LIKE ? AND (model LIKE ?) GROUP BY form ORDER BY form"; if ($statement) { //var dump return true call_user_func_array(array(&$statement, 'bind_param'), makeValuesReferenced($params)); if ($statement->execute()) { $statement->store_result(); var_dump($statement); if ($statement->num_rows >= 1) { $statement->bind_result($id, $mark, $model, $form); while ($rij = $statement->fetch()) { $result[] = new Housemark($id, $mark, $model, $form); } } } } var_dump($this->connection->error); return $result; } function makeValuesReferenced(array $arr): array { $refs = array(); foreach ($arr as $key => $value) $refs[$key] = &$arr[$key]; return $refs; }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.0.00.0080.01117.86
7.4.140.0220.00017.86
7.4.130.0000.02217.86
7.4.120.0090.00917.86
7.4.110.0110.01117.86
7.4.100.0160.00917.86
7.4.90.0130.00917.86
7.4.80.0100.01017.86
7.4.70.0070.01417.86
7.4.60.0140.01017.86
7.4.50.0050.02017.86
7.4.40.0120.00917.86
7.4.30.0080.01217.86
7.4.20.0180.00317.86
7.4.10.0090.00917.86
7.4.00.0130.00617.86
7.3.260.0130.00517.86
7.3.250.0130.00617.86
7.3.240.0110.00717.86
7.3.230.0100.01017.86
7.3.220.0160.01017.86
7.3.210.0160.00417.86
7.3.200.0110.00817.86
7.3.190.0040.02017.86
7.3.180.0080.01217.86
7.3.170.0120.00617.86
7.3.160.0180.00417.86
7.3.150.0050.01417.86
7.3.140.0120.00617.86
7.3.130.0180.00717.86
7.3.120.0160.00317.86
7.3.110.0000.01817.86
7.3.100.0040.01617.86
7.3.90.0180.00817.86
7.3.80.0100.01017.86
7.3.70.0120.00417.86
7.3.60.0200.00017.86
7.3.50.0140.00817.86
7.3.40.0120.00817.86
7.3.30.0040.01317.86
7.3.20.0200.00017.86
7.3.10.1120.01317.86
7.3.00.0100.00617.86

preferences:
154.4 ms | 1263 KiB | 7 Q