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 (?, ?, ?)"); if ($editFlag != "1"){ $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { echo '<center>Your content was added.</center>'; } else { echo "Error: " . $sql . "<br>" . $link->error; } } else { $config = HTMLPurifier_Config::createDefault(); $purifier = new HTMLPurifier($config); $clean_html = $purifier->purify($_POST['userContent']); $stmt->bind_param("iis", $section, $_SESSION['userID'], $clean_html); if ($stmt->execute() === TRUE) { } else { echo "Error: " . $sql . "<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.0100.01017.00
8.3.50.0070.00716.34
8.3.40.0150.00318.83
8.3.30.0070.01418.88
8.3.20.0030.00620.24
8.3.10.0080.00021.73
8.3.00.0030.00620.75
8.2.180.0150.00318.43
8.2.170.0170.00322.96
8.2.160.0100.00322.19
8.2.150.0040.00425.66
8.2.140.0030.00524.66
8.2.130.0080.00022.31
8.2.120.0040.00426.35
8.2.110.0060.00320.39
8.2.100.0040.00817.80
8.2.90.0000.00819.27
8.2.80.0060.00317.97
8.2.70.0030.00617.63
8.2.60.0030.00618.05
8.2.50.0060.00318.10
8.2.40.0080.00022.30
8.2.30.0020.00519.41
8.2.20.0000.00818.28
8.2.10.0030.00618.25
8.2.00.0000.00718.16
8.1.280.0110.01125.92
8.1.270.0000.00823.88
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00320.90
8.1.230.0040.00818.93
8.1.220.0040.00417.78
8.1.210.0000.00918.77
8.1.200.0060.00317.48
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0000.00818.53
8.1.160.0040.00419.10
8.1.150.0060.00318.89
8.1.140.0000.00819.67
8.1.130.0000.00718.90
8.1.120.0020.00517.59
8.1.110.0000.00817.56
8.1.100.0040.00417.61
8.1.90.0040.00417.43
8.1.80.0060.00317.51
8.1.70.0030.00517.50
8.1.60.0040.00417.70
8.1.50.0040.00417.59
8.1.40.0030.00617.63
8.1.30.0040.00417.61
8.1.20.0000.00817.75
8.1.10.0040.00417.58
8.1.00.0000.00917.50
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0070.00018.63
8.0.270.0070.00016.96
8.0.260.0030.00317.05
8.0.250.0040.00417.00
8.0.240.0030.00517.01
8.0.230.0040.00417.14
8.0.220.0070.00017.07
8.0.210.0000.00717.03
8.0.200.0030.00317.10
8.0.190.0090.00017.03
8.0.180.0000.00717.05
8.0.170.0020.00516.96
8.0.160.0070.00016.95
8.0.150.0040.00416.96
8.0.140.0000.00716.98
8.0.130.0000.00713.41
8.0.120.0000.00717.03
8.0.110.0080.00017.04
8.0.100.0080.00016.96
8.0.90.0040.00417.12
8.0.80.0120.00617.08
8.0.70.0070.00017.07
8.0.60.0030.00517.00
8.0.50.0040.00417.17
8.0.30.0100.00717.12
8.0.20.0100.01117.40
8.0.10.0070.00017.11
8.0.00.0200.00016.72
7.4.330.0050.00015.55
7.4.320.0030.00316.56
7.4.300.0030.00316.69
7.4.290.0030.00316.56
7.4.280.0000.00816.64
7.4.270.0050.00216.64
7.4.260.0070.00016.43
7.4.250.0030.00516.63
7.4.240.0070.00016.65
7.4.230.0040.00416.45
7.4.220.0150.01016.62
7.4.210.0110.00516.58
7.4.200.0030.00316.71
7.4.160.0100.00616.52
7.4.150.0140.00517.40
7.4.140.0090.00917.86
7.4.130.0160.00316.68
7.4.120.0120.00616.60
7.4.110.0090.00916.51
7.4.100.0030.01516.57
7.4.90.0190.00616.64
7.4.80.0120.00619.39
7.4.70.0130.00316.54
7.4.60.0150.00616.63
7.4.50.0070.00716.67
7.4.40.0160.00016.56
7.4.30.0070.01716.68
7.4.00.0120.00515.13
7.3.330.0030.00513.30
7.3.320.0030.00313.20
7.3.310.0000.00716.22
7.3.300.0040.00416.37
7.3.290.0030.00316.44
7.3.280.0080.00816.37
7.3.270.0110.00717.40
7.3.260.0100.00716.62
7.3.250.0170.00616.43
7.3.240.0090.00816.53
7.3.230.0120.01216.55
7.3.210.0140.00316.63
7.3.200.0110.00516.45
7.3.190.0070.01016.34
7.3.180.0070.01116.45
7.3.170.0070.01716.63
7.3.160.0200.00416.40
7.3.120.0060.01114.69
7.3.110.0040.01114.79
7.3.100.0070.00614.82
7.3.90.0090.00514.72
7.3.80.0060.00714.99
7.3.70.0080.00514.87
7.3.60.0050.00814.75
7.3.50.0000.01214.92
7.3.40.0070.00614.80
7.3.30.0050.01014.75
7.3.20.0070.00816.67
7.3.10.0060.00616.56
7.3.00.0110.00416.55
7.2.330.0090.00916.51
7.2.320.0130.00516.77
7.2.310.0090.00916.53
7.2.300.0110.00616.69
7.2.290.0090.00916.64
7.2.250.0070.00715.10
7.2.240.0100.00715.13
7.2.230.0050.00915.12
7.2.220.0080.00815.25
7.2.210.0040.00915.04
7.2.200.0030.01315.13
7.2.190.0040.01015.00
7.2.180.0030.01215.15
7.2.170.0030.01015.00
7.2.160.0060.00615.02
7.2.150.0030.01017.02
7.2.140.0070.01016.86
7.2.130.0090.00917.01
7.2.120.0090.00316.79
7.2.110.0060.00616.74
7.2.100.0050.00516.88
7.2.90.0060.00316.61
7.2.80.0000.01216.92
7.2.70.0070.00716.76
7.2.60.0060.00716.85
7.2.50.0120.00316.75
7.2.40.0070.00317.00
7.2.30.0040.01516.98
7.2.20.0060.01016.73
7.2.10.0090.00617.02
7.2.00.0080.00618.28
7.1.330.0050.00715.70
7.1.320.0030.00915.61
7.1.310.0050.01115.82
7.1.300.0070.00615.64
7.1.290.0060.00415.81
7.1.280.0050.00715.71
7.1.270.0090.00615.75
7.1.260.0050.00815.66
7.1.250.0060.00615.53
7.1.200.0060.00615.63
7.1.100.0250.01017.93
7.1.70.0000.01216.88
7.1.60.0430.01733.23
7.1.50.0500.01332.62
7.1.40.0470.01032.55
7.1.30.0430.01332.58
7.1.20.0500.01032.45
7.1.10.0570.01014.48
7.1.00.0370.00715.01
7.0.200.0330.01014.89
7.0.190.0400.01014.55
7.0.180.0370.01014.18
7.0.170.0400.00314.19
7.0.160.0370.00714.34
7.0.150.0330.01314.18
7.0.140.0330.01014.38
7.0.130.0270.01314.60
7.0.120.0300.01014.62
7.0.110.0330.01014.17
7.0.100.0500.01314.44
7.0.90.0300.00714.29
7.0.80.0270.01314.46
7.0.70.0330.01014.44
7.0.60.0330.01314.30
7.0.50.0230.01714.59
7.0.40.0470.00714.57
7.0.30.0300.00714.43
7.0.20.0300.01314.48
7.0.10.0270.01314.77
7.0.00.0300.00714.63

preferences:
96.04 ms | 401 KiB | 5 Q