3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'CPC >= $0 (Yesterday)', 'CPC (Link) > $100 (Today)' ]; foreach ($strings as $string) { list($metric, $sign, $digit, $time) = preg_match('~([\w ()]+) ([><]=?) \$(\d+) \(([^)]+)\)~', $string, $out) ? array_slice($out, 1) : ['', '', '', '']; echo "metric: $metric, sign: $sign, digit: $digit, time: $time\n"; var_export($metric); // notice no leading or trailing spaces / unwanted characters in the output echo "\n"; var_export($sign); // notice no leading or trailing spaces / unwanted characters in the output echo "\n"; var_export($digit); // notice no leading or trailing spaces / unwanted characters in the output echo "\n"; var_export($time); // notice no leading or trailing spaces / unwanted characters in the output echo "\n----------\n"; }

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.5.10.0090.00816.84
8.5.00.0140.00920.03
8.4.150.0020.00014.05
8.4.140.0120.00817.82
8.4.130.0070.00218.14
8.4.120.0120.00820.83
8.4.110.0100.01022.80
8.4.100.0060.00618.06
8.4.90.0110.00718.82
8.4.80.0070.00219.89
8.4.70.0100.01018.29
8.4.60.0170.00718.89
8.4.50.0090.01119.02
8.4.40.0150.00619.75
8.4.30.0160.00619.93
8.4.20.0030.01720.48
8.4.10.0080.00019.16
8.3.280.0120.00818.76
8.3.270.0110.00917.09
8.3.260.0110.00616.70
8.3.250.0060.01018.97
8.3.240.0110.00616.97
8.3.230.0130.00716.79
8.3.220.0070.00917.37
8.3.210.0050.00316.65
8.3.200.0050.00416.82
8.3.190.0100.00818.95
8.3.180.0040.00518.64
8.3.170.0090.00618.81
8.3.160.0030.01318.39
8.3.150.0110.00818.36
8.3.140.0080.00017.11
8.3.130.0130.00716.81
8.3.120.0030.00620.83
8.3.110.0040.00420.94
8.3.100.0040.00424.06
8.3.90.0060.00926.77
8.3.80.0060.00318.68
8.3.70.0150.00316.73
8.3.60.0090.00918.68
8.3.50.0100.00517.52
8.3.40.0110.00719.10
8.3.30.0110.00318.86
8.3.20.0000.00823.61
8.3.10.0030.00523.48
8.3.00.0070.00021.91
8.2.290.0110.00920.30
8.2.280.0160.00418.57
8.2.270.0090.00618.98
8.2.260.0160.00316.73
8.2.250.0000.00818.64
8.2.240.0060.00317.17
8.2.230.0140.00322.58
8.2.220.0060.00337.54
8.2.210.0070.01326.77
8.2.200.0110.00018.66
8.2.190.0100.00718.45
8.2.180.0130.00616.88
8.2.170.0080.00822.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00020.52
8.2.120.0040.00426.35
8.2.110.0030.00621.06
8.2.100.0120.00018.15
8.2.90.0040.00418.34
8.2.80.0030.00517.97
8.2.70.0000.00818.05
8.2.60.0070.00018.34
8.2.50.0030.00618.10
8.2.40.0000.00821.39
8.2.30.0040.00419.21
8.2.20.0040.00418.31
8.2.10.0030.00518.32
8.2.00.0000.00819.44
8.1.330.0110.00821.98
8.1.320.0050.01416.72
8.1.310.0110.00718.68
8.1.300.0150.00019.99
8.1.290.0060.00330.84
8.1.280.0140.00325.92
8.1.270.0040.00420.94
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0040.00422.63
8.1.230.0080.00420.98
8.1.220.0080.00017.91
8.1.210.0090.00019.04
8.1.200.0090.00017.60
8.1.190.0040.00417.48
8.1.180.0040.00418.10
8.1.170.0050.00318.62
8.1.160.0060.00319.03
8.1.150.0000.00719.00
8.1.140.0040.00422.17
8.1.130.0000.00720.07
8.1.120.0040.00417.59
8.1.110.0000.00717.63
8.1.100.0050.00217.61
8.1.90.0050.00317.44
8.1.80.0030.00617.50
8.1.70.0070.00317.64
8.1.60.0060.00317.77
8.1.50.0000.00817.66
8.1.40.0030.00617.74
8.1.30.0000.00817.71
8.1.20.0040.00417.68
8.1.10.0000.00917.73
8.1.00.0000.00717.69
8.0.300.0040.00419.86
8.0.290.0040.00416.88
8.0.280.0000.00718.39
8.0.270.0000.00717.25
8.0.260.0060.00018.39
8.0.250.0030.00317.01
8.0.240.0000.00717.13
8.0.230.0060.00317.00
8.0.220.0000.00717.17
8.0.210.0000.00717.11
8.0.200.0000.00717.13
8.0.190.0040.00416.98
8.0.180.0040.00417.05
8.0.170.0060.00317.07
8.0.160.0080.00017.15
8.0.150.0050.00316.93
8.0.140.0040.00417.04
8.0.130.0000.00613.47
8.0.120.0050.00217.04
8.0.110.0070.00017.22
8.0.100.0000.00717.15
8.0.90.0050.00317.12
8.0.80.0110.00817.10
8.0.70.0040.00417.04
8.0.60.0020.00516.93
8.0.50.0040.00417.15
8.0.30.0030.01617.55
8.0.20.0160.00517.47
8.0.10.0040.00417.24
8.0.00.0140.00816.89
7.4.330.0050.00016.81
7.4.320.0030.00316.78
7.4.300.0070.00016.89
7.4.290.0040.00416.81
7.4.280.0080.00016.89
7.4.270.0050.00316.75
7.4.260.0070.00016.70
7.4.250.0050.00316.87
7.4.240.0050.00216.82
7.4.230.0000.00816.93
7.4.220.0000.00816.63
7.4.210.0080.01016.93
7.4.200.0040.00416.79
7.4.160.0110.00816.65
7.4.140.0080.01217.86
7.4.130.0160.00616.87
7.4.120.0080.01016.75
7.4.110.0060.01316.61
7.4.100.0110.00716.69
7.4.90.0070.01116.77
7.4.80.0140.00319.39
7.4.70.0110.00816.63
7.4.60.0170.00216.60
7.4.50.0090.00616.69
7.4.40.0040.01216.71
7.4.00.0050.01215.17
7.3.330.0020.00513.20
7.3.320.0030.00313.21
7.3.310.0030.00316.42
7.3.300.0070.00016.44
7.3.290.0000.00716.53
7.3.280.0110.00616.45
7.3.260.0120.00916.59
7.3.240.0130.00816.55
7.3.230.0080.00816.53
7.3.210.0090.00916.58
7.3.200.0070.01016.62
7.3.190.0140.01016.55
7.3.180.0070.01116.61
7.3.170.0110.00616.75
7.3.160.0060.01316.71
7.3.120.0100.01015.21
7.3.110.0060.01314.97
7.3.100.0030.01015.03
7.3.90.0050.00515.21
7.3.80.0060.00614.95
7.3.70.0070.00315.06
7.3.60.0090.00614.84
7.3.50.0060.00915.02
7.3.40.0030.01015.04
7.3.30.0000.01315.10
7.3.20.0120.00316.74
7.3.10.0040.01216.91
7.3.00.0090.00316.91
7.2.330.0110.00716.88
7.2.320.0140.00516.75
7.2.310.0030.01316.75
7.2.300.0070.01616.86
7.2.290.0080.01516.89
7.2.250.0040.01515.42
7.2.240.0070.00715.07
7.2.230.0070.01015.17
7.2.220.0060.01315.21
7.2.210.0070.00715.09
7.2.200.0070.00715.29
7.2.190.0060.01015.45
7.2.180.0100.00315.17
7.2.170.0070.01015.19
7.2.120.0410.00714.93
7.2.110.0570.00314.84
7.2.100.0480.00615.01
7.2.90.0340.00314.79
7.2.80.0370.00314.94
7.2.70.0440.00715.23
7.2.60.0350.01315.21
7.2.50.0460.01114.96
7.2.40.0430.00715.35
7.2.30.0370.01314.95
7.2.20.0600.00315.23
7.2.10.0540.00315.26
7.2.00.0340.00715.20
7.1.330.0000.00915.91
7.1.320.0000.01116.13
7.1.310.0040.01116.17
7.1.300.0060.00915.98
7.1.290.0000.01315.85
7.1.280.0060.00915.77
7.1.270.0110.00315.73
7.1.260.0100.00315.92
5.6.380.0140.00314.34

preferences:
179.74 ms | 403 KiB | 5 Q