3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "categoryEnglishName:shouji dangers:(newuuid deep1条 IpCrossRule MobileCrossAreaRule) dangers:(FirstTimeImageRule OR DifferentIpmobledress) brid:(881581631eadc6e649b7dcb091a59396 OR 6dde9f581f114e2737bc56719990ec7a)"; if (preg_match_all('/([a-zA-Z]+)\:\(([^\)]+)\)/', $str, $m)) { for ($i = 0; $i < count($m[0]); $i++)) { $q = trim($m[0][$i]); if (strlen($q) == 0) continue; $key = $m[1][$i]; $qq = explode(" OR ", $m[1][$i]); if (count($qq) > 1) { $op = "OR"; } else { $qq = explode(" AND ", $m[1][$i]); if (count($qq) <= 1) { $qq = explode(" ", $m[1][$i]); } $op = "AND"; } foreach ($qq as $k => $v) { $qq[$k] = "{$key}:{$v}"; } $str = str_replace($q, "(" . implode($op, $qq) . ")", $str); } } var_dump($str);

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)
5.4.220.0150.04612.38
5.4.210.0190.04612.38
5.4.200.0130.05512.38
5.4.190.0150.04612.37
5.4.180.0110.05012.37
5.4.170.0120.06412.38
5.4.160.0150.04712.38
5.4.150.0140.04712.37
5.4.140.0160.05512.06
5.4.130.0100.05312.04
5.4.120.0150.04512.01
5.4.110.0100.05512.01
5.4.100.0130.05812.01
5.4.90.0140.04112.00
5.4.80.0150.03812.00
5.4.70.0140.04712.00
5.4.60.0120.04712.00
5.4.50.0140.04012.00
5.4.40.0120.04111.99
5.4.30.0110.04311.98
5.4.20.0140.03811.98
5.4.10.0110.04111.98
5.4.00.0110.03911.48
5.3.270.0140.04412.72
5.3.260.0130.04712.72
5.3.250.0120.04512.72
5.3.240.0130.04312.72
5.3.230.0130.04312.71
5.3.220.0090.05012.68
5.3.210.0110.04912.68
5.3.200.0140.04612.68
5.3.190.0100.04912.68
5.3.180.0120.04712.67
5.3.170.0110.04612.67
5.3.160.0110.04712.67
5.3.150.0130.04212.67
5.3.140.0120.04012.66
5.3.130.0120.04212.65
5.3.120.0150.03912.66
5.3.110.0110.04512.66
5.3.100.0100.04312.12
5.3.90.0140.03912.08
5.3.80.0110.04212.08
5.3.70.0080.04512.08
5.3.60.0120.04112.06
5.3.50.0110.04712.00
5.3.40.0120.04712.00
5.3.30.0140.04311.94
5.3.20.0110.04511.72
5.3.10.0100.04611.68
5.3.00.0120.04611.67

preferences:
139.34 ms | 1394 KiB | 7 Q