3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines = explode(PHP_EOL, "014-08-11 02:21:02:737 DEBUG Constructing Line Items 2014-08-11 02:21:02:739 ERROR [ActualLineItemCountMismatchEx] Doc Changed on Actual Line Item Count 2014-08-11 02:21:02:739 ERROR [ActualLineItemCountMismatchEx] 7 not equal to 2 2014-08-11 02:21:02:739 DEBUG Committing database transaction 2014-08-11 02:21:02:739 DEBUG Closing connection to the database "); $userMessages = array(); $errors = array( 'RFQReferenceNumberMismatchEx' => "Document Header Reference Number Value Mismatch", 'LineItemDescriptionMismatchEx' => "Line Item Description Mismatch", 'ActualLineItemCountMismatchEx' => "Actual Line Item Count Mismatch", 'LineItemCountMismatchEx' => "Document Header Line Item Count Attribute Value Mismatch", 'NoMatchingRFQWithRefenceFoundEx' => "There is no RFQ with a Reference No.: <refnumber> found within the last <no.ofdays>days that was sent by Buyer <buyertnid> to Match Supplier <matchsuppliertnid> that was forwarded by Match Buyer <matchbuyertnid> to Supplier <suppliertnid>", 'MatchFieldListNotFoundEx' => "The list of fields that will be used for matching is not set in the database", 'Unknown' => 'Other errors' ); foreach ($lines as $line) { if (!preg_match('/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}:\d{3} ERROR \[(\w+)\] (.*)$/', $line, $matches)) { continue; } $errorCode = $matches[1]; $errorDetails = $matches[2]; if (!array_key_exists($errorCode, $errors)) { $errorCode = 'Unknown'; } if (array_key_exists($errorCode, $userMessages)) { $userMessages[$errorCode]['details'][] = $errorDetails; } else { $userMessages[$errorCode] = array( 'error' => $errors[$errorCode], 'details' => array( $errorDetails ) ); } } var_dump($userMessages);

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.60.0070.01416.88
8.3.50.0110.00823.05
8.3.40.0130.00318.92
8.3.30.0040.01119.26
8.3.20.0040.01120.24
8.3.10.0090.00023.48
8.3.00.0080.00019.63
8.2.180.0040.01116.75
8.2.170.0140.00022.96
8.2.160.0100.00720.33
8.2.150.0130.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00826.16
8.2.120.0090.00021.28
8.2.110.0030.00622.34
8.2.100.0080.00418.02
8.2.90.0000.00817.88
8.2.80.0030.00617.97
8.2.70.0000.00918.03
8.2.60.0040.00418.05
8.2.50.0050.00318.10
8.2.40.0030.00620.42
8.2.30.0040.00419.38
8.2.20.0040.00417.88
8.2.10.0060.00318.31
8.2.00.0040.00418.00
8.1.280.0040.01125.92
8.1.270.0090.00023.96
8.1.260.0070.00026.35
8.1.250.0150.00028.09
8.1.240.0030.00623.76
8.1.230.0080.00319.14
8.1.220.0080.00017.79
8.1.210.0030.00518.77
8.1.200.0000.01017.48
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0040.00418.84
8.1.160.0040.00421.95
8.1.150.0000.00718.95
8.1.140.0000.00717.52
8.1.130.0070.00017.76
8.1.120.0000.00817.68
8.1.110.0030.00617.66
8.1.100.0040.00417.66
8.1.90.0020.00517.57
8.1.80.0060.00317.60
8.1.70.0050.00217.47
8.1.60.0040.00417.66
8.1.50.0030.00617.73
8.1.40.0040.00417.75
8.1.30.0000.00817.83
8.1.20.0080.00017.89
8.1.10.0000.00817.80
8.1.00.0040.00417.78
8.0.300.0040.00419.98
8.0.290.0060.00317.00
8.0.280.0070.00018.52
8.0.270.0040.00417.24
8.0.260.0060.00017.33
8.0.250.0030.00317.17
8.0.240.0030.00317.16
8.0.230.0000.00717.16
8.0.220.0000.00717.07
8.0.210.0000.00717.08
8.0.200.0000.00717.02
8.0.190.0050.00317.11
8.0.180.0000.01017.16
8.0.170.0040.00417.00
8.0.160.0000.00717.10
8.0.150.0000.00717.02
8.0.140.0040.00416.99
8.0.130.0060.00013.48
8.0.120.0000.00816.99
8.0.110.0000.00817.06
8.0.100.0060.00317.06
8.0.90.0040.00416.99
8.0.80.0100.00616.96
8.0.70.0000.00717.12
8.0.60.0080.00017.14
8.0.50.0000.00717.02
8.0.30.0070.01617.25
8.0.20.0120.01217.40
8.0.10.0020.00517.11
8.0.00.0100.00817.13
7.4.330.0050.00015.14
7.4.320.0000.00616.73
7.4.300.0000.00616.79
7.4.290.0000.00816.78
7.4.280.0040.00416.75
7.4.270.0040.00416.82
7.4.260.0030.00316.67
7.4.250.0050.00316.82
7.4.240.0020.00616.84
7.4.230.0030.00316.92
7.4.220.0040.02216.66
7.4.210.0050.00816.63
7.4.200.0040.00416.57
7.4.160.0080.01516.64
7.4.150.0070.01017.40
7.4.140.0120.01117.86
7.4.130.0060.01616.78
7.4.120.0050.01216.70
7.4.110.0140.00416.73
7.4.100.0120.00616.84
7.4.90.0080.01216.93
7.4.80.0030.01819.39
7.4.70.0110.00716.66
7.4.60.0040.01516.68
7.4.50.0050.00316.79
7.4.40.0130.00316.66
7.4.30.0120.00416.79
7.4.00.0090.00915.19
7.3.330.0060.00013.23
7.3.320.0060.00013.30
7.3.310.0040.00416.58
7.3.300.0000.00816.49
7.3.290.0130.00616.50
7.3.280.0070.00916.47
7.3.270.0120.00617.40
7.3.260.0180.00016.47
7.3.250.0160.00216.55
7.3.240.0080.00816.48
7.3.230.0130.00316.75
7.3.210.0090.00916.54
7.3.200.0100.00719.39
7.3.190.0040.01516.71
7.3.180.0040.01316.59
7.3.170.0070.01016.80
7.3.160.0220.00016.69
7.3.120.0040.01115.02
7.3.110.0070.00714.88
7.3.100.0040.01115.28
7.3.90.0000.00915.27
7.3.80.0060.01015.01
7.3.70.0040.00815.14
7.3.60.0070.00315.16
7.3.50.0100.00314.64
7.3.40.0090.00314.97
7.3.30.0000.01015.19
7.3.20.0090.00617.07
7.3.10.0040.01116.84
7.3.00.0070.00416.76
7.2.330.0120.01316.98
7.2.320.0040.01316.93
7.2.310.0070.01016.92
7.2.300.0000.01616.96
7.2.290.0150.00416.82
7.2.250.0100.00715.33
7.2.240.0070.01415.42
7.2.230.0030.01015.16
7.2.220.0070.01015.30
7.2.210.0090.00615.25
7.2.200.0030.00715.32
7.2.190.0030.00815.12
7.2.180.0100.00315.19
7.2.170.0060.00315.46
7.1.330.0070.00716.09
7.1.320.0120.00015.98
7.1.310.0080.00316.08
7.1.300.0030.01315.97
7.1.290.0080.00416.13
7.1.280.0090.00616.06
7.1.270.0090.00415.88
7.1.260.0000.01516.07
7.1.70.0100.01317.38
7.1.60.0070.01719.46
7.1.50.0070.01717.22
7.1.00.0000.08022.53
7.0.200.0060.00317.03
7.0.140.0030.07321.95
7.0.100.0070.08721.69
7.0.90.0100.04321.71
7.0.80.0030.07721.73
7.0.70.0030.05021.67
7.0.60.0030.06321.77
7.0.50.0100.07722.04
7.0.40.0130.07019.96
7.0.30.0030.08319.98
7.0.20.0100.08320.04
7.0.10.0100.07020.04
7.0.00.0100.08020.05
5.6.280.0000.07721.13
5.6.250.0070.07320.57
5.6.240.0130.07020.69
5.6.230.0070.07320.68
5.6.220.0070.07320.59
5.6.210.0030.07720.55
5.6.200.0030.08020.98
5.6.190.0000.08021.03
5.6.180.0030.08021.12
5.6.170.0000.08021.06
5.6.160.0030.07721.06
5.6.150.0070.07721.03
5.6.140.0030.08321.00
5.6.130.0070.04721.07
5.6.120.0070.04721.16
5.6.110.0100.06320.92
5.6.100.0000.06020.97
5.6.90.0070.08020.97
5.6.80.0000.06020.39
5.6.70.0070.06720.43
5.6.60.0000.08720.45
5.6.50.0070.07720.46
5.6.40.0030.04720.30
5.6.30.0000.08320.29
5.6.20.0000.07320.42
5.6.10.0070.06720.38
5.6.00.0030.05020.36
5.5.380.0070.07320.45
5.5.370.0100.07320.42
5.5.360.0030.08020.52
5.5.350.0070.04720.34
5.5.340.0030.09020.74
5.5.330.0030.04720.76
5.5.320.0000.05720.92
5.5.310.0000.07320.81
5.5.300.0070.07720.77
5.5.290.0130.07320.77
5.5.280.0070.04720.87
5.5.270.0000.08720.88
5.5.260.0070.07320.79
5.5.250.0100.05320.58
5.5.240.0000.06320.20
5.5.230.0100.07720.27
5.5.220.0030.06720.20
5.5.210.0100.07020.17
5.5.200.0070.07320.18
5.5.190.0070.06720.18
5.5.180.0100.06320.18
5.5.160.0000.04720.17
5.5.150.0070.07720.14
5.5.140.0030.08020.21
5.5.130.0030.07320.21
5.5.120.0000.08320.20
5.5.110.0070.08320.11
5.5.100.0070.06719.99
5.5.90.0000.07020.10
5.5.80.0100.08020.16
5.5.70.0030.08319.91
5.5.60.0030.08020.00
5.5.50.0070.07019.93
5.5.40.0030.04320.00
5.5.30.0000.05020.04
5.5.20.0000.04720.09
5.5.10.0100.07720.12
5.5.00.0130.06020.05
5.4.450.0000.08319.36
5.4.440.0070.07019.30
5.4.430.0030.07319.39
5.4.420.0030.07719.46
5.4.410.0100.05319.16
5.4.400.0070.06719.13
5.4.390.0030.07319.14
5.4.380.0000.07719.05
5.4.370.0030.07018.96
5.4.360.0030.07019.03
5.4.350.0030.03718.81
5.4.340.0000.07318.96
5.4.320.0030.07019.11
5.4.310.0000.04719.07
5.4.300.0030.04318.80
5.4.290.0000.08019.14
5.4.280.0130.07319.02
5.4.270.0100.03719.12
5.4.260.0030.08019.02
5.4.250.0000.08319.04
5.4.240.0000.08018.94
5.4.230.0070.07018.99
5.4.220.0030.07319.04
5.4.210.0030.04718.95
5.4.200.0030.07319.07
5.4.190.0000.07719.10
5.4.180.0030.08018.96
5.4.170.0100.03719.14
5.4.160.0000.07018.78
5.4.150.0070.07318.88
5.4.140.0030.07316.28
5.4.130.0070.07316.29
5.4.120.0070.07016.30
5.4.110.0030.07016.37
5.4.100.0030.07016.23
5.4.90.0070.03716.48
5.4.80.0070.07016.31
5.4.70.0030.07016.27
5.4.60.0000.05316.38
5.4.50.0000.07016.18
5.4.40.0030.07016.24
5.4.30.0000.07016.30
5.4.20.0070.07016.28
5.4.10.0030.05316.28
5.4.00.0030.07315.74
5.3.290.0070.07015.59
5.3.280.0130.04715.59
5.3.270.0070.07715.59
5.3.260.0070.07715.59
5.3.250.0000.06315.59
5.3.240.0070.07015.59
5.3.230.0000.07715.59
5.3.220.0000.07315.59
5.3.210.0070.06715.59
5.3.200.0030.07015.59
5.3.190.0030.06315.59
5.3.180.0070.04015.59
5.3.170.0000.05715.59
5.3.160.0000.05715.59
5.3.150.0070.07015.59
5.3.140.0000.08015.59
5.3.130.0030.07715.59
5.3.120.0100.07015.59
5.3.110.0030.07715.59
5.3.100.0100.07015.59
5.3.90.0070.07315.59
5.3.80.0000.07715.59
5.3.70.0070.06015.59
5.3.60.0070.03715.59
5.3.50.0070.06715.59
5.3.40.0000.04315.59
5.3.30.0030.06015.59
5.3.20.0000.04315.59
5.3.10.0030.06715.59
5.3.00.0000.07015.59
5.2.170.0030.03315.59
5.2.160.0030.04315.59
5.2.150.0100.05315.59
5.2.140.0000.06715.59
5.2.130.0000.06315.59
5.2.120.0070.05015.59
5.2.110.0030.06015.59
5.2.100.0000.05015.59
5.2.90.0030.03315.59
5.2.80.0000.06015.59
5.2.70.0030.03015.59
5.2.60.0000.06315.59
5.2.50.0030.06015.59
5.2.40.0030.06315.59
5.2.30.0130.05015.59
5.2.20.0000.06015.59
5.2.10.0030.06015.59
5.2.00.0000.03315.59
5.1.60.0070.05015.59
5.1.50.0030.05015.59
5.1.40.0100.04715.59
5.1.30.0000.05315.59
5.1.20.0070.05315.59
5.1.10.0000.05715.59
5.1.00.0030.05715.59
5.0.50.0030.03315.59
5.0.40.0070.04015.59
5.0.30.0030.04715.59
5.0.20.0030.03315.59
5.0.10.0030.04015.59
5.0.00.0030.06315.59
4.4.90.0070.03015.59
4.4.80.0000.03315.59
4.4.70.0000.03715.59
4.4.60.0030.03315.59
4.4.50.0030.03315.59
4.4.40.0000.05315.59
4.4.30.0000.03715.59
4.4.20.0030.03315.59
4.4.10.0000.03715.59
4.4.00.0070.05015.59
4.3.110.0030.03315.59
4.3.100.0000.02015.59
4.3.90.0000.01715.59
4.3.80.0000.02715.59
4.3.70.0000.02015.59
4.3.60.0030.03015.59
4.3.50.0030.03015.59
4.3.40.0000.05715.59
4.3.30.0030.03015.59
4.3.20.0030.01315.59
4.3.10.0000.02715.59
4.3.00.0070.02715.59

preferences:
48.98 ms | 401 KiB | 5 Q