3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); include('mysql.php'); $editFlag = $_POST['editFlag'] ?? false; $section = 1; require_once 'tools/HTMLPurifier.standalone.php'; $stmt = $link->prepare("INSERT INTO userContent (section, author, content) VALUES (?, ?, ?)"); $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); if ($editFlag != "1"){ $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } else { $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $stmt . "<br>" . $link->error; } } ?>

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.01118.28
8.3.50.0090.00616.39
8.3.40.0060.00918.88
8.3.30.0000.01618.96
8.3.20.0040.00420.18
8.3.10.0080.00021.82
8.3.00.0000.01021.01
8.2.180.0090.00918.29
8.2.170.0060.01022.96
8.2.160.0150.00019.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00422.38
8.2.120.0050.00326.35
8.2.110.0070.00321.17
8.2.100.0040.00817.84
8.2.90.0050.00318.16
8.2.80.0000.00818.05
8.2.70.0080.00017.75
8.2.60.0040.00418.03
8.2.50.0040.00418.10
8.2.40.0040.00422.46
8.2.30.0000.00719.46
8.2.20.0000.00718.20
8.2.10.0040.00418.21
8.2.00.0000.00718.22
8.1.280.0090.00925.92
8.1.270.0040.00423.81
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00319.43
8.1.230.0060.00621.03
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.25
8.1.190.0080.00017.36
8.1.180.0080.00018.10
8.1.170.0060.00318.72
8.1.160.0000.00819.06
8.1.150.0000.00718.98
8.1.140.0080.00019.66
8.1.130.0030.00618.98
8.1.120.0050.00317.55
8.1.110.0040.00417.46
8.1.100.0040.00417.53
8.1.90.0000.00817.50
8.1.80.0060.00317.44
8.1.70.0000.00717.40
8.1.60.0030.00517.66
8.1.50.0080.00017.69
8.1.40.0030.00517.61
8.1.30.0030.00617.64
8.1.20.0040.00417.66
8.1.10.0050.00317.64
8.1.00.0050.00317.60
8.0.300.0040.00420.07
8.0.290.0070.00016.88
8.0.280.0070.00018.43
8.0.270.0070.00017.29
8.0.260.0070.00017.03
8.0.250.0000.00717.14
8.0.240.0050.00316.95
8.0.230.0000.00717.08
8.0.220.0030.00317.08
8.0.210.0040.00417.02
8.0.200.0030.00316.98
8.0.190.0030.00717.14
8.0.180.0040.00417.06
8.0.170.0000.00717.09
8.0.160.0030.00517.11
8.0.150.0070.00016.96
8.0.140.0030.00517.02
8.0.130.0000.00713.43
8.0.120.0000.00817.01
8.0.110.0030.00516.97
8.0.100.0050.00217.05
8.0.90.0030.00517.16
8.0.80.0040.01116.98
8.0.70.0000.00716.88
8.0.60.0070.00016.99
8.0.50.0000.00717.00
8.0.30.0110.00717.05
8.0.20.0100.00917.40
8.0.10.0040.00417.01
8.0.00.0030.01317.13
7.4.330.0030.00215.55
7.4.320.0030.00316.61
7.4.300.0040.00416.48
7.4.290.0030.00316.63
7.4.280.0040.00416.61
7.4.270.0000.00816.55
7.4.260.0070.00016.54
7.4.250.0040.00416.36
7.4.240.0040.00416.41
7.4.230.0030.00316.68
7.4.220.0120.00616.71
7.4.210.0060.00916.63
7.4.200.0000.00716.47
7.4.160.0110.00716.60
7.4.150.0100.01017.40
7.4.140.0100.00817.86
7.4.130.0140.00416.65
7.4.120.0140.00916.55
7.4.110.0090.00916.65
7.4.100.0120.00616.65
7.4.90.0170.00316.49
7.4.80.0070.01619.39
7.4.70.0080.00816.51
7.4.60.0160.00716.66
7.4.50.0040.00716.74
7.4.40.0040.01216.55
7.4.30.0060.01216.48
7.4.00.0040.00714.99
7.3.330.0000.00713.16
7.3.320.0000.00713.29
7.3.310.0000.00716.52
7.3.300.0000.00716.34
7.3.290.0040.00416.35
7.3.280.0100.00716.37
7.3.270.0120.00917.40
7.3.260.0070.01316.39
7.3.250.0100.01016.38
7.3.240.0090.01016.43
7.3.230.0110.00616.56
7.3.210.0130.00416.35
7.3.200.0070.01016.72
7.3.190.0080.00916.30
7.3.180.0030.01416.26
7.3.170.0120.00416.40
7.3.160.0060.01216.34
7.3.10.0040.01116.85
7.3.00.0030.01316.79
7.2.330.0110.00616.54
7.2.320.0140.00316.70
7.2.310.0100.00716.49
7.2.300.0090.00916.71
7.2.290.0100.01316.68
7.2.130.0070.01016.96
7.2.120.0060.00916.79
7.2.110.0100.00716.54
7.2.100.0030.01016.94
7.2.90.0090.00617.04
7.2.80.0160.00316.87
7.2.70.0090.00616.77
7.2.60.0030.01216.89
7.2.50.0000.01716.88
7.2.40.0090.00317.11
7.2.30.0180.00017.00
7.2.20.0060.00617.09
7.2.10.0060.00916.90
7.2.00.0050.00718.27
7.1.250.0070.00715.42
7.1.200.0060.00615.45
7.1.100.0060.00817.93
7.1.70.0070.01017.13
7.1.60.0670.02733.28
7.1.50.0470.02732.84
7.1.40.0670.01032.45
7.1.30.0600.01032.58
7.1.20.0530.01732.76
7.1.10.0400.00714.59
7.1.00.0400.00014.64
7.0.200.0470.01014.71
7.0.190.0400.01014.66
7.0.180.0430.00714.17
7.0.170.0530.00314.43
7.0.160.0400.01014.27
7.0.150.0370.01714.03
7.0.140.0670.01014.38
7.0.130.0300.01014.56
7.0.120.0330.01014.45
7.0.110.0370.01014.41
7.0.100.0270.01314.36
7.0.90.0270.01314.30
7.0.80.0400.00714.45
7.0.70.0270.01314.25
7.0.60.0330.01314.27
7.0.50.0330.00714.41
7.0.40.0370.00714.54
7.0.30.0270.01314.56
7.0.20.0330.01314.50
7.0.10.0270.01014.50
7.0.00.0400.01014.66

preferences:
43.25 ms | 401 KiB | 5 Q