3v4l.org

run code in 300+ PHP versions simultaneously
<?php session_start(); if (isset($_POST['userContent'])) { require 'pdo.php'; require_once 'tools/HTMLPurifier.standalone.php'; $purifier = new HTMLPurifier(HTMLPurifier_Config::createDefault()); $data = [ 'author' => $_SESSION['userId'], 'content' => $purifier->purify($_POST['userContent']) ]; if (isset($_POST['id'])) { $data['contentID'] = $_POST['id']; $stmt = $db->prepare("UPDATE userContent SET content=:content WHERE id=:contentID AND author=:author"); } else { $data['section'] = 1; $stmt = $db->prepare("INSERT INTO userContent (section, author, content) VALUES (:section, :author, :content)"); } $stmt->execute($data); }

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.0120.00616.75
8.3.50.0100.01016.19
8.3.40.0060.00918.71
8.3.30.0120.00318.79
8.3.20.0070.00020.16
8.3.10.0040.00421.58
8.3.00.0040.00420.68
8.2.180.0100.01018.29
8.2.170.0120.00922.96
8.2.160.0070.00722.15
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00422.24
8.2.120.0000.00726.35
8.2.110.0110.00022.33
8.2.100.0120.00017.91
8.2.90.0050.00319.17
8.2.80.0000.00817.97
8.2.70.0000.01017.38
8.2.60.0000.00817.90
8.2.50.0030.00618.10
8.2.40.0070.00022.31
8.2.30.0040.00421.02
8.2.20.0030.00618.20
8.2.10.0000.00818.21
8.2.00.0040.00418.00
8.1.280.0110.01125.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.01023.92
8.1.230.0070.00417.82
8.1.220.0030.00617.77
8.1.210.0060.00318.77
8.1.200.0000.00917.23
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0030.00618.59
8.1.160.0040.00419.03
8.1.150.0000.00718.90
8.1.140.0000.00719.59
8.1.130.0000.00718.92
8.1.120.0040.00417.44
8.1.110.0020.00517.30
8.1.100.0000.00817.45
8.1.90.0060.00317.32
8.1.80.0040.00417.42
8.1.70.0000.00717.38
8.1.60.0000.00717.43
8.1.50.0080.00017.51
8.1.40.0000.00817.45
8.1.30.0000.00717.50
8.1.20.0040.00417.47
8.1.10.0040.00417.35
8.1.00.0060.00317.38
8.0.300.0080.00018.77
8.0.290.0050.00216.75
8.0.280.0030.00318.31
8.0.270.0030.00317.15
8.0.260.0030.00316.88
8.0.250.0040.00416.78
8.0.240.0030.00616.84
8.0.230.0040.00416.86
8.0.220.0000.00716.77
8.0.210.0070.00016.91
8.0.200.0090.00016.89
8.0.190.0040.00416.80
8.0.180.0000.00716.87
8.0.170.0040.00416.79
8.0.160.0040.00416.93
8.0.150.0000.00716.69
8.0.140.0070.00016.63
8.0.130.0040.00413.31
8.0.120.0070.00016.84
8.0.110.0060.00316.85
8.0.100.0070.00016.76
8.0.90.0070.00016.76
8.0.80.0100.00616.91
8.0.70.0040.00416.66
8.0.60.0000.00716.75
8.0.50.0080.00016.69
8.0.30.0070.01117.11
8.0.20.0200.00917.40
8.0.10.0070.00016.96
8.0.00.0060.01116.73
7.4.330.0000.00615.55
7.4.320.0000.00616.56
7.4.300.0030.00316.45
7.4.290.0030.00316.47
7.4.280.0080.00016.55
7.4.270.0030.00316.46
7.4.260.0030.00316.54
7.4.250.0000.00816.54
7.4.240.0000.00716.52
7.4.230.0000.00716.63
7.4.220.0160.01016.45
7.4.210.0090.00816.40
7.4.200.0030.00316.43
7.4.160.0140.00516.55
7.4.150.0070.01117.40
7.4.140.0070.01117.86
7.4.130.0160.00616.53
7.4.120.0130.00616.33
7.4.110.0030.01316.52
7.4.100.0090.00916.41
7.4.90.0040.01416.64
7.4.80.0040.01419.39
7.4.70.0070.01016.36
7.4.60.0150.00316.35
7.4.50.0070.01116.43
7.4.40.0070.01016.54
7.4.30.0170.00616.44
7.4.00.0030.01414.71
7.3.330.0040.00313.13
7.3.320.0070.00413.15
7.3.310.0070.00016.09
7.3.300.0000.00716.12
7.3.290.0040.00416.19
7.3.280.0090.00816.23
7.3.270.0100.00717.40
7.3.260.0080.00916.25
7.3.250.0120.00816.34
7.3.240.0110.00616.32
7.3.230.0040.01516.27
7.3.210.0140.00316.27
7.3.200.0110.00716.46
7.3.190.0100.00616.36
7.3.180.0130.00416.45
7.3.170.0030.01716.55
7.3.160.0040.01116.44
7.3.10.0060.00916.68
7.3.00.0090.00016.68
7.2.330.0110.00716.47
7.2.320.0030.01416.44
7.2.310.0100.01316.36
7.2.300.0100.01416.54
7.2.290.0070.01116.60
7.2.130.0030.00916.91
7.2.120.0060.00316.84
7.2.110.0000.01116.58
7.2.100.0070.00316.63
7.2.90.0070.00716.54
7.2.80.0100.00316.57
7.2.70.0060.00616.49
7.2.60.0000.01016.82
7.2.50.0000.01416.89
7.2.40.0050.00516.92
7.2.30.0080.00316.89
7.2.20.0080.00616.86
7.2.10.0030.00616.81
7.2.00.0020.00917.99
7.1.250.0060.00315.49
7.1.100.0000.01017.62
7.1.70.0030.00716.71
7.1.60.0500.01033.14
7.1.50.0570.00732.83
7.1.40.0530.00732.35
7.1.30.0570.01032.71
7.1.20.0530.00732.59
7.1.10.0400.01014.61
7.1.00.0430.00314.63
7.0.200.0430.00714.79
7.0.190.0430.01014.76
7.0.180.0400.01014.48
7.0.170.0570.00014.54
7.0.160.0430.01014.54
7.0.150.1270.01714.35
7.0.140.0370.01014.15
7.0.130.0370.01014.59
7.0.120.0430.00714.59
7.0.110.0370.01314.47
7.0.100.0430.00714.43
7.0.90.0570.00714.27
7.0.80.0400.00714.32
7.0.70.0400.01014.26
7.0.60.0430.01014.32
7.0.50.0430.00714.34
7.0.40.0400.00714.69
7.0.30.0430.00714.59
7.0.20.0570.00714.54
7.0.10.0400.01014.40
7.0.00.0400.01014.34

preferences:
29.84 ms | 401 KiB | 5 Q