3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ini = <<<INI TPL_CONTACT_MISC="Miscellaneous Info" date.timezone = Pacific/Tahiti TPL_CONTACT_MISC="Your german misc info translation" COM_TODO_ALIGN="Image Float" JOOMLA! DEFAULT IMAGES=Жуумла! үндсэн зурагнууд COM_TODO_ALIGN_DESC="This will apply the classes 'pull-left', 'pull-center' or 'pull-right' to the '<figure>' or '<img>' element" COM_TODO_BROWSE_FILES="Browse files" COM_TODO_CAPTION="Caption" BAD_DOUBLE_QUOTING="quote in " the middle" WELL_ESCAPED_DOUBLE_QUOTE="this is \" okay" COM_TODO_CAPTION_CLASS_LABEL="Caption Class" COM_MEMBERSHIPS_FIELD_MEMBERSHIP_LABEL 911 WARNING_TEXT="<span class=\"red\">Warning!</span>" COM_FRED_GREETING='Hello' COM_FRED_GREETING_BARNEY='Yo, Buddy' DR_SOLD="SOLD" upload_tmp_dir = /var/www/html/tmp INI; $anomalies = []; $result = []; foreach (explode(PHP_EOL, $ini) as $i => $line) { $parsed = @parse_ini_string($line); if (!is_array($parsed)) { $anomalies[] = "Invalid character(s) @ line index $i: $line"; continue; } $key = key($parsed); if ($key === null) { $anomalies[] = "No valid declaration @ line index $i: $line"; } elseif (!mb_check_encoding($key, 'ASCII')) { $anomalies[] = "Non-ASCII character found in key @ line index $i: $line"; } elseif (!preg_match('/^[A-Z\d_-]+/', $key)) { $anomalies[] = "Key is expected to contain only uppercase letters, numbers, underscores, and hyphens @ line index $i: $line"; } elseif (!preg_match('/^[A-Z\d_-]+="(.*)"$/', $line, $m)) { $anomalies[] = "Value not wrapped in double quotes @ line index $i: $line"; } elseif (preg_match('/(?<!\\\\)(?:\\\\\\\\)*"/', $m[1])) { $anomalies[] = "Value contains unescaped double quote @ line index $i: $line"; } elseif (key_exists($key, $result)) { $anomalies[] = "Redundant key declaration @ line index $i: $key => $result[$key] **overwritten by** $parsed[$key]"; $result[$key] = $parsed[$key]; // mimic Joomla parser behaviour } else { $result[$key] = $parsed[$key]; } } var_export($anomalies); echo "\n---\n"; var_export($result);

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.4.130.0140.00717.98
8.4.120.0150.00520.97
8.4.110.0100.01018.93
8.4.100.0120.00919.02
8.4.90.0130.00620.63
8.4.80.0090.01218.98
8.4.70.0080.01318.97
8.4.60.0120.01018.83
8.4.50.0100.00920.86
8.4.40.0120.00620.65
8.4.30.0080.00022.41
8.4.20.0090.00020.16
8.4.10.0150.00624.04
8.3.260.0040.00517.37
8.3.250.0110.00819.07
8.3.240.0050.00417.08
8.3.230.0110.01017.06
8.3.220.0090.01119.12
8.3.210.0130.00219.03
8.3.200.0140.00617.14
8.3.190.0080.01217.27
8.3.180.0160.00416.88
8.3.170.0150.00420.78
8.3.160.0060.00319.03
8.3.150.0130.00618.73
8.3.140.0130.00617.31
8.3.130.0060.00618.65
8.3.120.0040.00819.41
8.3.110.0120.00620.94
8.3.100.0100.00624.06
8.3.90.0030.00626.77
8.3.80.0030.00618.93
8.3.70.0030.01317.11
8.3.60.0110.00417.13
8.3.50.0110.00717.10
8.3.40.0030.01720.64
8.3.30.0090.00619.20
8.3.20.0090.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0140.00520.42
8.2.280.0090.01020.45
8.2.270.0120.00616.86
8.2.260.0050.00317.00
8.2.250.0000.00818.64
8.2.240.0120.00317.04
8.2.230.0060.01322.58
8.2.220.0040.00437.54
8.2.210.0090.00926.77
8.2.200.0070.00316.88
8.2.190.0070.00716.85
8.2.180.0110.00717.00
8.2.170.0090.00619.20
8.2.160.0070.00722.96
8.2.150.0050.00325.66
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00619.91
8.2.110.0060.00322.43
8.2.100.0080.00417.97
8.2.90.0040.00417.88
8.2.80.0060.00618.16
8.2.70.0000.00817.88
8.2.60.0120.00617.63
8.2.50.0210.00017.59
8.2.40.0110.00617.63
8.2.30.0140.00217.75
8.2.20.0180.00017.72
8.2.10.0100.00617.63
8.2.00.0080.00817.63
8.1.330.0060.01316.72
8.1.320.0080.00816.40
8.1.310.0060.00316.44
8.1.300.0030.00618.60
8.1.290.0000.00930.84
8.1.280.0100.01325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.05
8.1.230.0080.00321.05
8.1.220.0040.00417.91
8.1.210.0000.00918.77
8.1.200.0000.00917.73
8.1.190.0110.00817.09
8.1.180.0130.00617.38
8.1.170.0120.00517.37
8.1.160.0140.00317.13
8.1.150.0130.00217.50
8.1.140.0160.00017.13
8.1.130.0140.00517.38
8.1.120.0140.00517.63
8.1.110.0070.01017.38
8.1.100.0100.00717.50
8.1.90.0130.00417.25
8.1.80.0130.00317.63
8.1.70.0080.00817.48
8.1.60.0130.00617.50
8.1.50.0150.00417.38
8.1.40.0160.00317.50
8.1.30.0180.00017.72
8.1.20.0140.00517.38
8.1.10.0200.00017.38
8.1.00.0110.00817.63
8.0.300.0000.00719.94
8.0.290.0060.00317.00
8.0.280.0080.01016.71
8.0.270.0180.00016.63
8.0.260.0080.00816.75
8.0.250.0140.00416.86
8.0.240.0120.00817.00
8.0.230.0100.00716.75
8.0.220.0070.01016.75
8.0.210.0160.00017.00
8.0.200.0170.00016.96
8.0.190.0150.00417.00
8.0.180.0100.00716.75
8.0.170.0040.01116.86
8.0.160.0140.00317.00
8.0.150.0180.00016.75
8.0.140.0160.00016.88
8.0.130.0110.00616.87
8.0.120.0140.00416.73
8.0.110.0100.00516.61
8.0.100.0130.00316.71
8.0.90.0110.00616.71
8.0.80.0140.00316.88
8.0.70.0150.00216.87
8.0.60.0150.00216.88
8.0.50.0140.00416.88
8.0.30.0090.00716.52
8.0.20.0110.00516.88
8.0.10.0170.00016.98

preferences:
27.44 ms | 403 KiB | 5 Q