3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once '../dbconfig.php'; if (isset($_POST)) { $post_id = $_POST["id"]; $title = trim($_POST['title']); $post_link = str_replace(" ", "_", strtolower(trim($_POST['title']))); $img = $_POST['img']; $text = trim($_POST['text']); $chords = trim($_POST['chords']); $SC = trim($_POST["linkSC"]); $poster = trim($_SESSION["user_name"]); $dt = date('Y-m-d H:i:s'); $isupdated = 1; $links = json_decode($_POST["links"], true); try { $stmt = $db_con->prepare("UPDATE `PJW_posts` SET title=?, post_link=?, img=?,text=?, sc_link=?, chords=?, updated_by=?, updatetime=?, is_updated=? WHERE id=?"); if ($stmt->execute(array($title, $post_link, $img, $chords, $SC, $chords, $poster, $dt, $isupdated, $post_id))) { echo json_encode(["status" => 200]); exit; } else { echo json_encode(["status" => 422, "error" => "Database error."]); } } catch (PDOException $e) { echo json_encode(["status" => $e->getCode(), "error" => $e->getMessage()]); } }

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.01418.68
8.3.50.0040.01118.34
8.3.40.0120.00318.60
8.3.30.0120.00318.96
8.3.20.0040.00421.78
8.3.10.0070.00023.61
8.3.00.0040.00423.48
8.2.180.0110.00818.27
8.2.170.0110.00419.13
8.2.160.0070.00722.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.12
8.2.120.0040.00426.35
8.2.110.0070.00321.11
8.2.100.0110.00017.97
8.2.90.0030.00617.92
8.2.80.0080.00017.97
8.2.70.0040.00417.78
8.2.60.0060.00318.03
8.2.50.0080.00018.15
8.2.40.0030.00619.31
8.2.30.0040.00419.18
8.2.20.0070.00018.04
8.2.10.0000.00818.00
8.2.00.0040.00418.13
8.1.280.0120.00325.92
8.1.270.0040.00423.88
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.84
8.1.230.0060.00620.90
8.1.220.0060.00317.74
8.1.210.0060.00318.77
8.1.200.0050.00317.23
8.1.190.0090.00317.35
8.1.180.0030.00518.10
8.1.170.0000.00818.59
8.1.160.0040.00418.84
8.1.150.0040.00420.75
8.1.140.0030.00517.60
8.1.130.0030.00320.63
8.1.120.0030.00617.34
8.1.110.0050.00217.46
8.1.100.0040.00417.45
8.1.90.0000.00817.32
8.1.80.0040.00417.43
8.1.70.0040.00417.36
8.1.60.0000.00917.69
8.1.50.0000.00817.58
8.1.40.0000.00817.55
8.1.30.0090.00017.62
8.1.20.0050.00217.65
8.1.10.0050.00517.56
8.1.00.0000.00817.55
8.0.300.0040.00420.11
8.0.290.0040.00417.00
8.0.280.0000.00818.53
8.0.270.0030.00317.30
8.0.260.0040.00417.36
8.0.250.0040.00417.00
8.0.240.0030.00617.03
8.0.230.0040.00417.13
8.0.220.0040.00417.09
8.0.210.0080.00016.93
8.0.200.0000.00817.13
8.0.190.0050.00317.13
8.0.180.0030.00617.12
8.0.170.0030.00617.08
8.0.160.0050.00317.05
8.0.150.0070.00317.03
8.0.140.0070.00417.05
8.0.130.0060.00313.49
8.0.120.0000.00817.01
8.0.110.0020.00517.09
8.0.100.0030.00517.07
8.0.90.0050.00216.88
8.0.80.0070.00717.03
8.0.70.0040.00317.00
8.0.60.0070.00016.95
8.0.50.0000.00717.01
8.0.30.0100.00817.15
8.0.20.0120.00817.40
8.0.10.0000.00817.04
8.0.00.0090.00816.73
7.4.330.0060.00015.55
7.4.320.0000.00716.69
7.4.300.0000.00616.43
7.4.290.0070.00016.52
7.4.280.0050.00216.63
7.4.270.0050.00316.64
7.4.260.0030.00616.49
7.4.250.0030.00316.52
7.4.240.0030.00516.57
7.4.230.0030.00316.75
7.4.220.0070.00016.64
7.4.210.0020.01516.57
7.4.200.0000.00716.73
7.4.160.0140.00416.63
7.4.140.0130.00717.86
7.4.130.0150.00616.52
7.4.120.0110.00816.54
7.4.110.0120.00916.51
7.4.100.0090.01316.41
7.4.90.0120.00616.55
7.4.80.0070.01119.39
7.4.70.0090.00616.56
7.4.60.0060.01216.56
7.4.50.0130.00316.59
7.4.40.0060.00916.50
7.4.10.0120.00616.50
7.4.00.0100.00715.94
7.3.330.0030.00313.19
7.3.320.0060.00013.04
7.3.310.0070.00016.29
7.3.300.0000.00716.18
7.3.290.0070.00016.38
7.3.280.0110.00616.28
7.3.260.0100.01116.42
7.3.240.0100.00716.27
7.3.230.0100.01016.57
7.3.210.0140.00916.34
7.3.200.0100.00716.38
7.3.190.0160.00416.37
7.3.180.0160.00016.33
7.3.170.0080.00816.32
7.3.160.0120.00616.49
7.3.130.0110.00816.26
7.3.120.0090.00916.24
7.3.110.0030.01016.29
7.3.100.0100.00716.41
7.3.90.0060.00916.36
7.3.80.0040.01116.25
7.3.70.0070.00716.22
7.3.60.0030.01016.30
7.3.50.0070.01016.36
7.3.40.0120.00616.38
7.3.30.0070.00316.15
7.3.20.0070.00318.16
7.3.10.0120.00318.09
7.3.00.0120.00618.13
7.2.330.0120.00916.66
7.2.320.0070.01716.51
7.2.310.0060.01216.59
7.2.300.0110.01116.31
7.2.290.0100.00716.46
7.2.260.0100.01016.17
7.2.250.0030.01616.41
7.2.240.0100.00616.39
7.2.230.0060.01516.57
7.2.220.0030.00916.57
7.2.210.0060.01016.39
7.2.200.0060.00916.38
7.2.190.0110.00016.36
7.2.180.0100.01016.22
7.2.170.0060.00616.33
7.2.160.0030.01016.50
7.2.150.0060.00918.18
7.2.140.0070.01018.45
7.2.130.0100.00718.14
7.2.120.0070.00718.30
7.2.110.0000.01318.35
7.2.100.0110.00418.14
7.2.90.0090.00618.12
7.2.80.0070.00618.23
7.2.70.0100.00718.34
7.2.60.0070.00817.34
7.2.50.0070.00517.37
7.2.40.0650.00818.06
7.2.30.0100.00918.08
7.2.20.0020.01518.06
7.2.10.0760.01018.05
7.2.00.0080.01018.01
7.1.330.0060.00617.20
7.1.320.0070.00717.12
7.1.310.0030.01317.36
7.1.300.0080.00617.07
7.1.290.0040.01117.13
7.1.280.0060.01017.29
7.1.270.0000.01417.24
7.1.260.0040.01117.13
7.1.250.0030.01417.27
7.1.240.0040.01117.23
7.1.230.0100.00617.19
7.1.220.0070.01117.00
7.1.210.0080.01117.24
7.1.200.0080.00816.35
7.1.190.0070.00717.12
7.1.180.0110.00417.32
7.1.170.0000.01417.22
7.1.160.0650.01016.99
7.1.150.0070.01016.91
7.1.140.0080.00616.99
7.1.130.0120.00616.99
7.1.120.0080.01016.84
7.1.110.0050.00916.70
7.1.100.0050.00916.59
7.1.90.0990.01316.57
7.1.80.0120.00916.68
7.1.70.0090.00716.18
7.1.60.0160.01225.10
7.1.50.0810.01025.07
7.1.40.1030.01224.90
7.1.30.1060.00924.97
7.1.20.0950.01224.84
7.1.10.0880.01115.93
7.1.00.0880.00615.87
7.0.330.0000.01516.75
7.0.320.0040.00716.81
7.0.310.0090.00616.83
7.0.300.0030.01116.79
7.0.290.0070.00716.68
7.0.280.0030.00616.82
7.0.270.0090.00316.78
7.0.260.0090.00316.55
7.0.250.0040.00816.91
7.0.240.0030.01016.93
7.0.230.0070.00716.77
7.0.220.0060.00316.76
7.0.210.0000.01416.85
7.0.200.0070.00716.89
7.0.190.0030.01116.82
7.0.180.0060.00316.97
7.0.170.0040.00716.86
7.0.160.0060.00916.84
7.0.150.0040.01116.84
7.0.140.0060.00916.73
7.0.130.0000.01316.86
7.0.120.0040.00716.68
7.0.110.0070.01016.67
7.0.100.0060.01016.92
7.0.90.0070.00716.88
7.0.80.0130.00316.55
7.0.70.0070.00716.76
7.0.60.0090.00616.63
7.0.50.0000.00816.83
7.0.40.0030.01414.75
7.0.30.0070.01014.80
7.0.20.0040.00714.82
7.0.10.0030.01414.89
7.0.00.0150.00314.87
5.6.400.0040.01515.42
5.6.390.0000.01415.47
5.6.380.0060.01215.50
5.6.370.0120.00015.66
5.6.360.0030.01015.73
5.6.350.0060.01015.54
5.6.340.0120.00015.72
5.6.330.0040.01115.78
5.6.320.0060.00315.95
5.6.310.0100.00615.66
5.6.300.0100.00015.54
5.6.290.0030.01115.68
5.6.280.0030.01215.44
5.6.270.0070.01015.58
5.6.260.0030.00715.81
5.6.250.0030.01315.76
5.6.240.0060.00615.70
5.6.230.0030.01415.63
5.6.220.0090.00615.58
5.6.210.0000.01115.61
5.6.200.0070.01015.51
5.6.190.0060.01215.40
5.6.180.0100.00715.62
5.6.170.0070.01015.72
5.6.160.0040.00815.44
5.6.150.0040.00815.57
5.6.140.0070.00715.62
5.6.130.0060.01215.85
5.6.120.0100.00315.71
5.6.110.0030.00915.58
5.6.100.0030.01215.69
5.6.90.0090.00915.52
5.6.80.0090.00615.52
5.6.70.0070.01015.24
5.6.60.0030.01015.47
5.6.50.0070.00715.81
5.6.40.0080.00815.65
5.6.30.0030.01015.62
5.6.20.0000.01315.59
5.6.10.0040.00815.59
5.6.00.0030.01415.79

preferences:
63.1 ms | 401 KiB | 5 Q