3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ 'new message from Bob [22:105:3905:534]', 'user Dylan posted a question in section General', 'new message from Mary(gold) [19504:8728:18524:78941]' ]; $formats = [ '/new message from (\w+) \[(\d+):(\d+):(\d+):(\d+)\]/', // this would actually be something like '/(?<=new message from )(.*)(?=[)(.*)(?=:)(.*)(?=:)(.*)(?=:)(.*)(?=])/' '/user (\w+) posted a question in section ([\w ]+)/', '/new message from (\w+)\((\w+)\) \[(\d+):(\d+):(\d+):(\d+)\]/', ]; foreach ($input as $line) { foreach ($formats as $key => $format) { $data = []; if (preg_match($format, $line, $data)) { array_shift($data); echo 'format: ' . $key . ', data: ' . var_export($data, true) . "\n"; continue; } } }

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.70.0040.01516.61
8.3.60.0060.00918.30
8.3.50.0090.00918.01
8.3.40.0080.00818.96
8.3.30.0060.00918.80
8.3.20.0040.00418.98
8.3.10.0080.00023.70
8.3.00.0080.00020.77
8.2.190.0070.00716.58
8.2.180.0160.00616.63
8.2.170.0140.00022.96
8.2.160.0130.00622.25
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00417.91
8.2.120.0070.00026.35
8.2.110.0060.00322.28
8.2.100.0040.00818.01
8.2.90.0050.00317.94
8.2.80.0040.00417.97
8.2.70.0060.00317.93
8.2.60.0040.00418.16
8.2.50.0060.00618.10
8.2.40.0000.00821.16
8.2.30.0000.00919.32
8.2.20.0000.00717.95
8.2.10.0000.00818.03
8.2.00.0030.00518.09
8.1.280.0110.01125.92
8.1.270.0080.00022.10
8.1.260.0060.00326.35
8.1.250.0030.01628.09
8.1.240.0090.00317.36
8.1.230.0040.00720.96
8.1.220.0050.00317.78
8.1.210.0090.00018.97
8.1.200.0090.00017.48
8.1.190.0040.00417.38
8.1.180.0030.00518.10
8.1.170.0000.00818.87
8.1.160.0040.00418.80
8.1.150.0000.00718.92
8.1.140.0070.00022.09
8.1.130.0040.00420.18
8.1.120.0000.00817.63
8.1.110.0040.00417.67
8.1.100.0090.00017.59
8.1.90.0000.00817.51
8.1.80.0040.00417.50
8.1.70.0000.00717.50
8.1.60.0080.00017.73
8.1.50.0040.00417.57
8.1.40.0040.00417.72
8.1.30.0060.00617.78
8.1.20.0030.00517.76
8.1.10.0030.00617.71
8.1.00.0040.00417.58
8.0.300.0050.00219.73
8.0.290.0030.00516.88
8.0.280.0030.00318.46
8.0.270.0040.00316.99
8.0.260.0030.00318.54
8.0.250.0030.00317.02
8.0.240.0000.00717.14
8.0.230.0030.00316.98
8.0.220.0060.00317.07
8.0.210.0040.00417.10
8.0.200.0000.00717.00
8.0.190.0040.00417.02
8.0.180.0050.00317.11
8.0.170.0000.00817.07
8.0.160.0000.00817.14
8.0.150.0040.00416.91
8.0.140.0000.00917.07
8.0.130.0070.00013.52
8.0.120.0040.00416.92
8.0.110.0070.00017.05
8.0.100.0070.00016.85
8.0.90.0000.00717.10
8.0.80.0090.01217.07
8.0.70.0050.00216.83
8.0.60.0000.00717.11
8.0.50.0000.00816.96
8.0.30.0110.00617.34
8.0.20.0090.00917.40
8.0.10.0050.00216.96
8.0.00.0110.01016.94
7.4.330.0000.00515.55
7.4.320.0060.00016.68
7.4.300.0070.00016.81
7.4.290.0030.00316.73
7.4.280.0000.00716.82
7.4.270.0030.00616.71
7.4.260.0070.00016.85
7.4.250.0080.00016.80
7.4.240.0000.00716.86
7.4.230.0000.00716.73
7.4.220.0060.00316.57
7.4.210.0110.00516.76
7.4.200.0040.00416.80
7.4.160.0100.00716.75
7.4.140.0100.00817.86
7.4.130.0190.00016.67
7.4.120.0090.00916.69
7.4.110.0160.00716.77
7.4.100.0130.00616.76
7.4.90.0030.01416.75
7.4.80.0060.01219.39
7.4.70.0180.00516.56
7.4.60.0070.01016.70
7.4.50.0000.01716.64
7.4.40.0090.01016.52
7.4.10.0060.01215.12
7.4.00.0050.01114.98
7.3.330.0000.00513.14
7.3.320.0000.00513.11
7.3.310.0070.00016.43
7.3.300.0000.00816.42
7.3.290.0030.00316.39
7.3.280.0110.00616.49
7.3.260.0060.01316.76
7.3.240.0090.01316.66
7.3.230.0120.00816.77
7.3.210.0080.00816.80
7.3.200.0050.01116.43
7.3.190.0060.01516.88
7.3.180.0060.01516.44
7.3.170.0090.01116.34
7.3.160.0090.01416.73
7.3.130.0070.01015.18
7.3.120.0090.00614.86
7.3.110.0070.01314.77
7.3.100.0070.00714.62
7.3.90.0040.01115.00
7.3.80.0040.00814.59
7.3.70.0030.01414.80
7.3.60.0060.00315.09
7.3.50.0120.00315.01
7.3.40.0000.01114.89
7.3.30.0120.00315.06
7.3.20.0060.00617.04
7.3.10.0090.00616.86
7.3.00.0040.00916.71
7.2.330.0130.00616.84
7.2.320.0090.00616.57
7.2.310.0130.00316.74
7.2.300.0120.00616.82
7.2.290.0130.00316.87
7.2.260.0060.01215.39
7.2.250.0070.00415.34
7.2.240.0090.00314.99
7.2.230.0060.01215.05
7.2.220.0000.01015.29
7.2.210.0030.01315.21
7.2.200.0100.00315.20
7.2.190.0050.00515.23
7.2.180.0080.00815.15
7.2.170.0100.00715.38
7.2.160.0000.01515.22
7.2.150.0070.01017.04
7.2.140.0030.01217.18
7.2.130.0030.01217.16
7.2.120.0250.00715.90
7.2.110.0240.00615.84
7.2.100.0280.00515.99
7.2.90.0240.00716.05
7.2.80.0310.00715.97
7.2.70.0230.00516.22
7.2.60.0130.01516.01
7.2.50.0440.00915.96
7.2.40.0380.00916.05
7.2.30.0430.01116.19
7.2.20.0340.00916.06
7.2.10.0630.00716.08
7.2.00.0300.00316.04
7.1.330.0060.00916.01
7.1.320.0060.00615.98
7.1.310.0060.00616.02
7.1.300.0070.00715.96
7.1.290.0080.00015.75
7.1.280.0070.00715.84
7.1.270.0120.00315.83
7.1.260.0030.01016.13
7.1.250.0090.00316.06
7.1.240.0230.00715.04
7.1.230.0230.00814.79
7.1.220.0230.00815.13
7.1.210.0260.01114.98
7.1.200.0290.00615.02
7.1.190.0220.00815.09
7.1.180.0390.00914.96
7.1.170.0350.00615.02
7.1.160.0330.00814.93
7.1.150.0260.01114.93
7.1.140.0310.00815.00
7.1.130.0290.01015.00
7.1.120.0280.00314.83
7.1.110.0260.00315.11
7.1.100.0250.01314.98
7.1.90.0390.00715.06
7.1.80.0440.00414.97
7.1.70.0220.01215.03
7.1.60.0250.00815.09
7.1.50.0280.00914.89
7.1.40.0560.00315.01
7.1.30.0230.01014.73
7.1.20.0290.00515.01
7.1.10.0240.00914.86
7.1.00.0250.00614.87
7.0.330.0030.00715.78
7.0.320.0110.00515.59
7.0.310.0060.00615.65
7.0.300.0090.00315.70
7.0.290.0040.00715.70
7.0.280.0040.01215.71
7.0.270.0060.00315.42
7.0.260.0060.00915.63
7.0.250.0100.00315.68
7.0.240.0050.00815.43
7.0.230.0040.00815.82
7.0.220.0060.01015.59
7.0.210.0080.00815.66
7.0.200.0060.00615.53
7.0.190.0000.01415.22
7.0.180.0050.00515.25
7.0.170.0090.00015.75
7.0.160.0060.00915.52
7.0.150.0060.01015.34
7.0.140.0070.00715.65
7.0.130.0030.01215.70
7.0.120.0070.00715.61
7.0.110.0030.01015.77
7.0.100.0090.00615.30
7.0.90.0040.01115.49
7.0.80.0090.00615.71
7.0.70.0000.01215.66
7.0.60.0060.00615.80
7.0.50.0030.00615.31
7.0.40.0040.00413.79
7.0.30.0030.01013.86
7.0.20.0090.00613.73
7.0.10.0030.00713.61
7.0.00.0030.00513.66
5.6.400.0070.00414.53
5.6.390.0040.01114.41
5.6.380.0070.01014.27
5.6.370.0030.01314.46
5.6.360.0060.00614.68
5.6.350.0070.00714.20
5.6.340.0030.01014.19
5.6.330.0070.00714.14
5.6.320.0090.00614.62
5.6.310.0000.01514.54
5.6.300.0070.00714.49
5.6.290.0060.00614.71
5.6.280.0000.01014.82
5.6.270.0100.00614.29
5.6.260.0030.01314.27
5.6.250.0080.00514.43
5.6.240.0000.01514.49
5.6.230.0030.00614.32
5.6.220.0000.01314.36
5.6.210.0030.00614.36
5.6.200.0130.00314.69
5.6.190.0070.01014.55
5.6.180.0000.00914.45
5.6.170.0160.00014.52
5.6.160.0060.00914.62
5.6.150.0030.01014.45
5.6.140.0000.01214.23
5.6.130.0080.00314.31
5.6.120.0030.00614.30
5.6.110.0140.00014.52
5.6.100.0030.01214.46
5.6.90.0070.01014.30
5.6.80.0060.00614.60
5.6.70.0030.00914.37
5.6.60.0110.00014.48
5.6.50.0060.00914.30
5.6.40.0060.00914.35
5.6.30.0080.00814.51
5.6.20.0130.00314.34
5.6.10.0030.01014.34
5.6.00.0070.00814.34

preferences:
22.04 ms | 401 KiB | 5 Q