3v4l.org

run code in 300+ PHP versions simultaneously
<?php $htmlentitiesTabel = get_html_translation_table(HTML_ENTITIES); function Kleuren($code) { global $htmlentitiesTabel; $code = trim($code); $aantal = substr_count($code,"\n")+1; $gekleurd = highlight_string($code,true); $gekleurd = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $gekleurd); $gekleurd = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $gekleurd); $tabel = $htmlentitiesTabel; unset($tabel['<']); unset($tabel['>']); unset($tabel['&']); unset($tabel['\'']); unset($tabel['"']); $gekleurd = strtr($gekleurd, $tabel); $breedte = strlen($aantal)*7; $hoogteblok = $aantal > 25 ? "308" : $aantal*12+26; $hoogteregels = $aantal*12+16; $blok = "<div class='Codeblok' style='height: $hoogteblok"."px".($aantal <= 25 ? "; overflow-y: hidden" : "")."'> <table cellpadding='0' cellspacing='0'> <tr> <td class='CodeblokRegels' style='height: $hoogteregels"."px; width: $breedte"."px'> <code>"; for($i = 1; $i <= $aantal; $i++) { $blok .= "$i<br>"; } $blok .= " </code> </td> <td class='CodeblokCode'> $gekleurd </td> </tr> </table> </div>"; return $blok; } function Tekst($waarde) { global $htmlentitiesTabel; $waarde = str_replace("§","&sect;",$waarde); preg_match_all("#\[code\](.*?)\[/code\](\r)?(\n)?#is", $waarde, $GeenSmilies['code']); preg_match_all("#\[php\](.*?)\[/php\](\r)?(\n)?#is", $waarde, $GeenSmilies['php']); foreach($GeenSmilies as $i => $code) { foreach($code[0] as $nr => $tekst) { $waarde = str_replace($tekst,"§".$i.$nr."§",$waarde); } } $waarde = htmlentities($waarde,ENT_QUOTES); } // Smilies vervangen // UBB-codes vervangen $waarde = nl2br($waarde); foreach($GeenSmilies as $i => $code) { foreach($code[1] as $nr => $tekst) { $waarde = str_replace("&sect;$i$nr&sect;",Kleuren($tekst),$waarde); } } $waarde = str_replace("&amp;sect;","&sect;",$waarde);

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.0090.00616.75
8.3.50.0140.00722.92
8.3.40.0100.00718.71
8.3.30.0040.01118.92
8.3.20.0000.00820.30
8.3.10.0050.00323.65
8.3.00.0040.00419.38
8.2.180.0080.00816.75
8.2.170.0070.01122.96
8.2.160.0040.01118.97
8.2.150.0070.00024.18
8.2.140.0090.00024.66
8.2.130.0060.00326.16
8.2.120.0040.00420.94
8.2.110.0060.00321.99
8.2.100.0090.00318.09
8.2.90.0030.00619.18
8.2.80.0030.00617.97
8.2.70.0000.00817.50
8.2.60.0080.00317.80
8.2.50.0080.00518.07
8.2.40.0110.00018.25
8.2.30.0000.00718.00
8.2.20.0040.00417.80
8.2.10.0080.00018.09
8.2.00.0050.00217.88
8.1.280.0140.00725.92
8.1.270.0100.00622.14
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00023.96
8.1.230.0080.00319.22
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0070.00317.35
8.1.190.0080.00017.34
8.1.180.0030.00618.10
8.1.170.0030.00518.58
8.1.160.0050.00322.14
8.1.150.0000.00718.88
8.1.140.0040.00417.57
8.1.130.0000.00717.87
8.1.120.0020.00517.43
8.1.110.0000.00817.42
8.1.100.0030.00717.55
8.1.90.0030.00617.54
8.1.80.0040.00717.59
8.1.70.0030.00317.50
8.1.60.0040.00417.68
8.1.50.0000.00917.63
8.1.40.0040.00417.57
8.1.30.0000.00917.74
8.1.20.0000.00717.65
8.1.10.0040.00417.52
8.1.00.0040.00417.34
8.0.300.0030.00618.77
8.0.290.0000.00716.88
8.0.280.0070.00018.39
8.0.270.0000.00717.32
8.0.260.0000.00617.33
8.0.250.0040.00417.10
8.0.240.0000.00817.07
8.0.230.0080.00017.04
8.0.220.0030.00317.00
8.0.210.0030.00317.02
8.0.200.0000.00717.14
8.0.190.0040.00417.11
8.0.180.0060.00316.96
8.0.170.0050.00317.07
8.0.160.0030.00517.14
8.0.150.0000.00716.87
8.0.140.0000.00717.03
8.0.130.0000.00613.43
8.0.120.0030.00516.95
8.0.110.0000.00816.93
8.0.100.0050.00217.09
8.0.90.0040.00417.09
8.0.80.0110.01116.93
8.0.70.0000.00817.02
8.0.60.0000.00816.95
8.0.50.0040.00416.91
8.0.30.0110.00917.02
8.0.20.0110.00817.40
8.0.10.0030.00517.05
8.0.00.0060.01516.76
7.4.330.0050.00015.13
7.4.320.0000.00616.63
7.4.300.0040.00416.62
7.4.290.0070.00016.72
7.4.280.0000.00816.42
7.4.270.0000.00716.47
7.4.260.0000.00716.70
7.4.250.0080.00016.65
7.4.240.0000.00716.59
7.4.230.0080.00016.46
7.4.220.0100.00716.72
7.4.210.0120.00916.70
7.4.200.0080.00016.56
7.4.160.0180.00516.52
7.4.150.0140.00317.40
7.4.140.0050.01217.86
7.4.130.0150.00616.64
7.4.120.0080.01016.61
7.4.110.0140.00316.69
7.4.100.0090.00916.71
7.4.90.0110.00716.53
7.4.80.0000.02319.39
7.4.70.0090.01016.78
7.4.60.0080.00816.57
7.4.50.0040.00016.53
7.4.40.0030.01416.64
7.4.30.0130.00316.51
7.4.00.0080.00814.98
7.3.330.0050.00013.43
7.3.320.0000.00813.14
7.3.310.0040.00416.23
7.3.300.0030.00416.39
7.3.290.0080.00816.34
7.3.280.0090.01116.36
7.3.270.0070.01017.40
7.3.260.0130.01216.38
7.3.250.0090.00716.32
7.3.240.0170.00716.35
7.3.230.0130.01016.39
7.3.210.0090.00916.29
7.3.200.0130.00619.39
7.3.190.0170.00716.39
7.3.180.0120.00316.68
7.3.170.0080.00816.38
7.3.160.0130.00316.68
7.2.330.0180.00316.66
7.2.320.0120.00416.62
7.2.310.0160.00616.66
7.2.300.0030.01616.57
7.2.290.0030.01316.58
7.2.60.0090.01316.86
7.2.00.0040.01119.47
7.1.200.0070.00415.57
7.1.100.0090.00318.00
7.1.70.0000.00817.02
7.1.60.0180.00719.40
7.1.50.0070.01716.79
7.1.00.0070.07322.35
7.0.200.0440.00614.48
7.0.140.0030.07022.11
7.0.60.0100.06320.02
7.0.50.0130.07317.92
7.0.40.0000.04720.11
7.0.30.0200.04020.23
7.0.20.0270.04020.08
7.0.10.0030.06320.15
7.0.00.0100.06720.23
5.6.280.0070.07020.91
5.6.210.0000.06020.50
5.6.200.0030.05318.15
5.6.190.0100.07320.55
5.6.180.0170.04720.52
5.6.170.0270.07720.71
5.6.160.0000.05720.50
5.6.150.0070.07318.19
5.6.140.0000.08718.16
5.6.130.0070.03718.21
5.6.120.0130.06021.13
5.6.110.0030.08021.09
5.6.100.0130.07721.04
5.6.90.0130.08321.16
5.6.80.0100.04720.55
5.5.350.0200.03320.36
5.5.340.0030.05717.99
5.5.330.0170.07320.31
5.5.320.0030.05320.28
5.5.310.0370.07020.42
5.5.300.0130.07717.98
5.5.290.0070.09018.08
5.5.280.0030.08720.91
5.5.270.0030.05020.80
5.5.260.0070.08320.82
5.5.250.0030.08320.75
5.5.240.0000.03720.27
5.4.450.0430.05319.32
5.4.440.0730.08019.39
5.4.430.0170.05019.47
5.4.420.0130.05719.61
5.4.410.0170.06019.45
5.4.400.0300.06019.26
5.4.390.0700.05719.26
5.4.380.0230.06718.55
5.4.370.0370.04318.83
5.4.360.0430.04718.77
5.4.350.0300.05018.73
5.4.340.0400.04318.63
5.4.320.0080.03512.56
5.4.310.0070.03812.56
5.4.300.0040.03812.56
5.4.290.0090.03512.55
5.4.280.0110.03212.45
5.4.270.0060.03812.46
5.4.260.0070.03712.45
5.4.250.0100.03412.46
5.4.240.0070.03612.45
5.4.230.0050.03812.45
5.4.220.0050.03712.45
5.4.210.0050.03712.44
5.4.200.0090.03512.45
5.4.190.0050.04212.45
5.4.180.0050.04012.43
5.4.170.0100.04312.45
5.4.160.0050.03712.45
5.4.150.0040.03912.44
5.4.140.0080.03512.12
5.4.130.0100.03312.11
5.4.120.0100.03912.07
5.4.110.0100.03812.07
5.4.100.0050.04012.07
5.4.90.0070.03712.07
5.4.80.0070.05212.07
5.4.70.0050.04412.07
5.4.60.0060.03612.06
5.4.50.0040.04512.07
5.4.40.0080.03412.05
5.4.30.0060.04212.05
5.4.20.0070.03412.05
5.4.10.0050.03512.05
5.4.00.0080.03411.54
5.3.290.0070.05212.80
5.3.280.0070.03812.71
5.3.270.0050.04112.72
5.3.260.0070.04012.72
5.3.250.0100.03512.72
5.3.240.0100.05112.72
5.3.230.0100.04312.71
5.3.220.0090.03512.68
5.3.210.0030.04312.68
5.3.200.0060.03712.68
5.3.190.0070.03712.68
5.3.180.0060.03612.68
5.3.170.0060.04012.68
5.3.160.0040.05412.68
5.3.150.0070.04412.68
5.3.140.0080.04212.66
5.3.130.0080.04312.66
5.3.120.0100.04612.66
5.3.110.0090.03712.66
5.3.100.0050.04112.15
5.3.90.0050.03812.13
5.3.80.0060.03812.12
5.3.70.0040.04112.12
5.3.60.0070.03512.11
5.3.50.0060.03812.05
5.3.40.0070.03812.05
5.3.30.0050.04212.02
5.3.20.0050.03711.79
5.3.10.0060.03411.76
5.3.00.0050.03711.74
5.2.170.0060.0299.25
5.2.160.0040.0319.25
5.2.150.0030.0339.25
5.2.140.0050.0319.25
5.2.130.0060.0299.21
5.2.120.0060.0289.21
5.2.110.0040.0319.22
5.2.100.0070.0289.21
5.2.90.0050.0299.21
5.2.80.0030.0339.21
5.2.70.0050.0309.20
5.2.60.0050.0309.16
5.2.50.0040.0319.13
5.2.40.0050.0319.11
5.2.30.0050.0369.08
5.2.20.0060.0279.07
5.2.10.0070.0268.98
5.2.00.0060.0288.85
5.1.60.0030.0258.13
5.1.50.0030.0268.13
5.1.40.0040.0248.11
5.1.30.0030.0278.46
5.1.20.0030.0278.48
5.1.10.0030.0268.21
5.1.00.0050.0248.20
5.0.50.0010.0236.70
5.0.40.0040.0186.56
5.0.30.0010.0336.38
5.0.20.0040.0196.34
5.0.10.0060.0176.32
5.0.00.0030.0316.31
4.4.90.0030.0144.78
4.4.80.0040.0184.75
4.4.70.0020.0164.75
4.4.60.0010.0174.75
4.4.50.0000.0184.77
4.4.40.0030.0254.71
4.4.30.0030.0164.76
4.4.20.0030.0164.84
4.4.10.0050.0144.85
4.4.00.0050.0234.76
4.3.110.0020.0164.67
4.3.100.0020.0154.67
4.3.90.0020.0164.64
4.3.80.0040.0244.60
4.3.70.0030.0184.63
4.3.60.0040.0154.63
4.3.50.0040.0184.63
4.3.40.0020.0304.56
4.3.30.0020.0173.36
4.3.20.0020.0163.34
4.3.10.0030.0183.28
4.3.00.0070.0237.92

preferences:
42.72 ms | 400 KiB | 5 Q