3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cookie_name = "user"; $cookie_value = "david"; $past_time = time() - 3600; //subtraction from time causes deletion of cookie foreach ( $_COOKIE as $key => $value ) { setcookie( $key, $value, $past_time, '/' ); } //counting number of cookies if(count($_COOKIE) > 0) { echo "<br>Cookies are enabled/exists"; } else { echo "<br>Cookies are disabled/not exists"; } ?>

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.1.80.0050.00817.36
8.1.70.0120.00617.47
8.1.60.0140.00717.46
8.1.50.0110.01117.53
8.1.40.0160.00417.40
8.1.30.0120.00917.70
8.1.20.0120.00817.54
8.1.10.0080.00817.32
8.1.00.0120.00817.40
8.0.210.0080.00416.87
8.0.200.0120.00416.88
8.0.190.0190.00016.95
8.0.180.0140.00316.89
8.0.170.0090.00716.79
8.0.160.0120.00416.90
8.0.150.0150.00216.84
8.0.140.0060.01116.79
8.0.130.0110.00516.76
8.0.120.0050.01116.75
8.0.110.0100.00716.86
8.0.100.0090.00916.86
8.0.90.0180.00016.80
8.0.80.0100.00716.95
8.0.70.0110.00516.82
8.0.60.0040.01216.89
8.0.50.0000.01616.91
8.0.30.0130.00216.77
8.0.20.0100.00716.79
8.0.10.0040.01217.04
8.0.00.0040.00816.97
7.4.300.0030.00516.40
7.4.290.0160.00316.47
7.4.280.0150.00216.58
7.4.270.0140.00416.46
7.4.260.0140.00316.57
7.4.250.0110.00716.59
7.4.240.0130.00616.35
7.4.230.0120.00616.48
7.4.220.0130.00216.57
7.4.210.0120.00416.57
7.4.200.0130.00316.43
7.4.190.0120.00416.55
7.4.180.0160.00016.61
7.4.160.0130.00316.61
7.4.150.0080.00816.63
7.4.140.0100.00516.42
7.4.130.0100.00716.46
7.4.120.0130.00316.50
7.4.110.0090.00616.35
7.4.100.0140.00316.56
7.4.90.0090.00616.33
7.4.80.0070.00716.36
7.4.70.0090.00016.48
7.4.60.0030.00316.46
7.4.50.0000.00616.37
7.4.40.0030.00316.30
7.4.30.0030.00316.46
7.4.20.0060.00016.34
7.4.10.0030.00616.50
7.4.00.0040.00915.66
7.3.330.0070.00415.96
7.3.320.0160.00016.14
7.3.310.0130.00316.34
7.3.300.0170.00016.03
7.3.290.0160.00016.25
7.3.280.0120.00416.29
7.3.270.0060.01216.15
7.3.260.0110.00416.14
7.3.250.0120.00216.11
7.3.240.0090.00616.23
7.3.230.0170.00016.14
7.3.220.0130.00316.05
7.3.210.0110.00516.04
7.3.200.0120.00415.93
7.3.190.0150.00415.94
7.3.180.0170.00016.18
7.3.170.0140.00215.92
7.3.160.0090.00615.91
7.3.150.0150.00016.19
7.3.140.0160.00016.18
7.3.130.0110.00416.11
7.3.120.0080.00915.40
7.3.110.0100.00715.35
7.3.100.0100.00515.43
7.3.90.0070.00615.49
7.3.80.0080.00915.26
7.3.70.0080.00815.50
7.3.60.0090.00515.51
7.3.50.0040.01015.48
7.3.40.0100.00615.57
7.3.30.0070.00815.48
7.3.20.0090.00317.37
7.3.10.0080.00517.08
7.3.00.0090.00517.14
7.2.340.0000.01116.56
7.2.330.0150.00016.32
7.2.320.0100.00816.36
7.2.310.0130.00416.53
7.2.300.0060.01016.53
7.2.290.0110.00416.55
7.2.280.0150.00016.30
7.2.270.0080.00816.40
7.2.260.0090.00616.48
7.2.250.0110.00515.75
7.2.240.0070.00815.73
7.2.230.0110.00415.74
7.2.220.0140.00215.80
7.2.210.0070.00915.80
7.2.200.0110.00615.79
7.2.190.0080.00715.77
7.2.180.0120.00515.69
7.2.170.0090.00615.81
7.2.160.0120.00216.41
7.2.150.0160.00018.44
7.2.140.0080.00818.41
7.2.130.0120.00417.77
7.2.120.0070.01017.67
7.2.110.0080.00517.45
7.2.100.2440.00416.62
7.2.90.2070.00716.64
7.2.80.2180.00516.69
7.2.70.1870.01016.63
7.2.60.1760.01016.77
7.2.50.0420.00616.87
7.2.40.0680.01116.78
7.2.30.0660.00516.80
7.2.20.0470.00416.83
7.2.10.0390.01016.74
7.2.00.1870.00616.81
7.1.330.0090.00616.46
7.1.320.0080.00616.27
7.1.310.0120.00416.48
7.1.300.0110.00316.47
7.1.290.0070.00516.38
7.1.280.0080.00616.59
7.1.270.0100.00316.52
7.1.260.0040.01016.41
7.1.250.0070.00416.52
7.1.240.0080.00817.05
7.1.230.0110.00417.21
7.1.220.0100.00715.45
7.1.210.3350.01015.29
7.1.200.2800.00715.29
7.1.190.2810.00315.58
7.1.180.3040.00715.49
7.1.170.0590.00315.42
7.1.160.0660.00515.44
7.1.150.0690.00915.42
7.1.140.0500.00815.37
7.1.130.3070.00415.34
7.1.120.2450.00215.38
7.1.110.2550.00715.45
7.1.100.2630.00915.29
7.1.90.0170.00215.39
7.1.80.0120.00515.44
7.1.70.0140.00315.36
7.1.60.1220.00924.48
7.1.50.0840.00924.47
7.1.40.1440.01224.61
7.1.30.0330.00524.32
7.1.20.0470.00724.26
7.1.10.0390.00215.26
7.1.00.1390.00815.57
7.0.330.0120.00316.76
7.0.320.0110.00316.77
7.0.310.0120.00416.85
7.0.300.0140.00016.97
7.0.290.0150.00016.89
7.0.280.0140.00016.88
7.0.270.0100.00316.92
7.0.260.0060.00916.92
7.0.250.0060.01017.03
7.0.240.0070.00717.09
7.0.230.0130.00017.16
7.0.220.0050.00916.86
7.0.210.0130.00316.87
7.0.200.0140.00017.04
7.0.190.0070.00716.74
7.0.180.0140.00016.83
7.0.170.0120.00216.88
7.0.160.0100.00516.95
7.0.150.0150.00016.68
7.0.140.0100.00416.66
7.0.130.0060.00716.92
7.0.120.0150.00016.81
7.0.110.0090.00517.01
7.0.100.0100.00516.77
7.0.90.0100.00316.92
7.0.80.0110.00416.88
7.0.70.0130.00016.68
7.0.60.0140.00016.88
7.0.50.0050.00916.91
7.0.40.0160.00017.02
7.0.30.0100.00517.00
7.0.20.0130.00016.86
7.0.10.0120.00417.00
7.0.00.0090.00616.94
5.6.400.0100.00515.84
5.6.390.0040.01115.76
5.6.380.0080.00714.95
5.6.370.0030.01115.91
5.6.360.0120.00215.63
5.6.350.0110.00415.58
5.6.340.0100.00315.77
5.6.330.0070.00715.80
5.6.320.0070.00715.77
5.6.310.0130.00315.82
5.6.300.0150.00015.51
5.6.290.0140.00015.77
5.6.280.0110.00415.79
5.6.270.0110.00415.63
5.6.260.0100.00515.62
5.6.250.0090.00515.82
5.6.240.0090.00415.94
5.6.230.0080.00415.93
5.6.220.0130.00215.99
5.6.210.0070.00715.84
5.6.200.0090.00616.02
5.6.190.0100.00516.06
5.6.180.0150.00015.75
5.6.170.0090.00615.75
5.6.160.0080.00416.00
5.6.150.0090.00415.75
5.6.140.0090.00415.68
5.6.130.0120.00215.88
5.6.120.0080.00615.77
5.6.110.0090.00615.79
5.6.100.0090.00515.86
5.6.90.0140.00015.84
5.6.80.0100.00315.61
5.6.70.0130.00215.94
5.6.60.0040.00815.82
5.6.50.0100.00215.82
5.6.40.0070.00715.68
5.6.30.0110.00315.90
5.6.20.0100.00315.70
5.6.10.0110.00415.61
5.6.00.0110.00315.78

preferences:
69.54 ms | 403 KiB | 5 Q