3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keywordRegex = '(?<key>-?mock)'; $valueRegex = '"(?<quoted>(?:[^"]|\\\")*)"|(?<unquoted>[^"\s]+)'; $regex = "/(?<=^|\\s){$keywordRegex}:\\s*{$valueRegex}/"; echo $regex, "\n\n"; $inputs = array( 'mock:"foo"', 'mock:bar\"foo', 'mock:""foo""' ); foreach ( $inputs as $term ) { $matches = null; echo $term, "\n"; preg_match( $regex, $term, $matches ); var_dump( $matches ); }

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.3.40.0070.01418.78
8.3.30.0110.00718.76
8.3.20.0040.00420.13
8.3.10.0040.00423.65
8.3.00.0050.00319.66
8.2.170.0040.01122.96
8.2.160.0120.00321.31
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00022.06
8.2.120.0030.00526.35
8.2.110.0130.01022.25
8.2.100.0090.00318.03
8.2.90.0090.00019.13
8.2.80.0000.00817.97
8.2.70.0040.00417.88
8.2.60.0090.00018.04
8.2.50.0050.00318.10
8.2.40.0000.00822.29
8.2.30.0040.00421.13
8.2.20.0070.00417.88
8.2.10.0040.00418.25
8.2.00.0000.00818.18
8.1.270.0040.00423.92
8.1.260.0000.00828.09
8.1.250.0070.00028.09
8.1.240.0070.00421.31
8.1.230.0070.00417.64
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0000.00917.47
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0060.00318.77
8.1.160.0000.00822.05
8.1.150.0060.00320.66
8.1.140.0060.00319.65
8.1.130.0040.00417.60
8.1.120.0070.00017.53
8.1.110.0080.00017.59
8.1.100.0070.00017.57
8.1.90.0070.00317.63
8.1.80.0020.00517.66
8.1.70.0030.00517.56
8.1.60.0030.00617.73
8.1.50.0040.00417.56
8.1.40.0000.00917.56
8.1.30.0030.00617.82
8.1.20.0000.01117.64
8.1.10.0040.00417.68
8.1.00.0040.00417.55
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0070.00018.42
8.0.270.0000.00817.29
8.0.260.0090.00017.24
8.0.250.0040.00416.98
8.0.240.0030.00317.14
8.0.230.0050.00316.98
8.0.220.0040.00416.95
8.0.210.0030.00317.04
8.0.200.0000.00817.08
8.0.190.0040.00417.14
8.0.180.0040.00417.07
8.0.170.0030.00517.08
8.0.160.0040.00417.02
8.0.150.0050.00316.95
8.0.140.0040.00417.02
8.0.130.0030.00313.43
8.0.120.0000.00817.01
8.0.110.0000.00817.05
8.0.100.0070.00017.00
8.0.90.0040.00417.10
8.0.80.0080.00817.09
8.0.70.0000.00817.04
8.0.60.0040.00416.99
8.0.50.0050.00217.10
8.0.30.0090.00917.15
8.0.20.0080.01217.40
8.0.10.0030.00517.02
8.0.00.0120.00616.99
7.4.330.0030.00315.12
7.4.320.0040.00416.71
7.4.300.0030.00316.70
7.4.290.0050.00516.69
7.4.280.0050.00316.84
7.4.270.0000.00816.82
7.4.260.0000.00716.60
7.4.250.0000.00816.68
7.4.240.0030.00316.82
7.4.230.0040.00416.71
7.4.220.0130.01316.75
7.4.210.0100.00716.80
7.4.200.0040.00416.53
7.4.160.0120.00716.65
7.4.150.0110.00817.40
7.4.140.0140.00817.86
7.4.130.0070.01216.62
7.4.120.0110.01016.44
7.4.110.0120.00616.92
7.4.100.0170.00316.49
7.4.90.0180.00016.59
7.4.80.0100.00719.39
7.4.70.0070.01416.71
7.4.60.0090.00916.62
7.4.50.0040.01216.69
7.4.40.0140.00316.69
7.4.30.0060.01116.66
7.4.00.0110.00715.29
7.3.330.0030.00313.30
7.3.320.0000.00613.39
7.3.310.0000.00716.43
7.3.300.0070.00016.49
7.3.290.0030.00516.34
7.3.280.0080.01116.49
7.3.270.0120.00617.40
7.3.260.0120.00616.80
7.3.250.0120.00816.48
7.3.240.0090.00916.55
7.3.230.0100.01516.70
7.3.210.0050.01216.67
7.3.200.0080.00816.75
7.3.190.0110.01416.71
7.3.180.0080.01116.31
7.3.170.0180.00616.75
7.3.160.0130.01016.30
7.3.10.0120.00416.47
7.3.00.0100.00016.74
7.2.330.0130.00816.68
7.2.320.0110.00716.84
7.2.310.0110.00716.74
7.2.300.0160.00616.54
7.2.290.0140.00416.71
7.2.130.0170.00316.92
7.2.120.0050.00516.96
7.2.110.0060.00816.77
7.2.100.0040.00716.92
7.2.90.0130.00716.71
7.2.80.0090.01417.07
7.2.70.0150.00816.69
7.2.60.0070.01016.81
7.2.50.0140.00716.73
7.2.40.0030.01216.82
7.2.30.0140.00617.04
7.2.20.0120.00617.04
7.2.10.0090.00616.90
7.2.00.0070.00716.85
7.1.250.0000.00815.90
7.1.200.0030.00715.84
7.1.70.0080.00017.50
7.1.60.0030.01019.75
7.1.00.0070.07322.48
7.0.200.0370.00015.14
7.0.90.0700.00019.98
7.0.80.0670.00020.04
7.0.70.0730.00020.19
7.0.60.0730.00019.94
7.0.50.0730.00020.27
7.0.40.0670.00020.28
7.0.30.0670.00020.20
7.0.20.0670.00020.35
7.0.10.0700.00020.43
7.0.00.0700.00020.24
5.6.240.0700.00020.57
5.6.230.0770.00020.81
5.6.220.0770.00020.80
5.6.210.0630.00020.66
5.6.200.0670.00021.08
5.6.190.0700.00021.13
5.6.180.0670.00021.12
5.6.170.0800.00020.98
5.6.160.0670.00021.17
5.6.150.0730.00021.05
5.6.140.0630.00021.11
5.6.130.0800.00021.11
5.6.120.0700.00021.07
5.6.110.0700.00021.06
5.6.100.0670.00021.06
5.6.90.0730.00021.10
5.6.80.0630.00020.55
5.6.70.0670.00020.47
5.6.60.0600.00020.49
5.6.50.0600.00020.55
5.6.40.0670.00020.45
5.6.30.0630.00020.44
5.6.20.0630.00020.44
5.6.10.0800.00020.44
5.6.00.0800.00020.52

preferences:
59.22 ms | 400 KiB | 5 Q