3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); $cookie_name = "mysiterandomuser"; $cookie_value = "justanotheruser"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); ob_end_clean(); ?> <!DOCTYPE html> <html> <body> <?php if(!isset($_COOKIE[$cookie_name])) { echo "Cookie named '" . $cookie_name . "' is not set!"; } else { echo "Cookie '" . $cookie_name . "' is set!<br>"; echo "Value is: " . $_COOKIE[$cookie_name]; } ?> <p><strong>Note:</strong> You might have to reload the page to see the new value of the cookie.</p> </body> </html>

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)
7.4.00.0090.00615.22
7.3.120.0060.01214.93
7.3.110.0100.00715.07
7.3.100.0120.00414.50
7.3.90.0030.00914.65
7.3.80.0100.00314.89
7.3.70.0060.00614.66
7.3.60.0080.00814.90
7.3.50.0040.00714.54
7.3.40.0000.00815.00
7.3.30.0040.01114.91
7.3.20.0070.01016.54
7.3.10.0070.00316.64
7.3.00.0060.00316.44
7.2.250.0110.00715.44
7.2.240.0030.01515.09
7.2.230.0110.00414.73
7.2.220.0030.01015.23
7.2.210.0100.00315.37
7.2.200.0030.00915.14
7.2.190.0090.00615.28
7.2.180.0030.00915.08
7.2.170.0120.00015.00
7.2.60.0070.00717.02
7.1.330.0120.00315.77
7.1.320.0000.01515.97
7.1.310.0040.00815.62
7.1.300.0100.00315.82
7.1.290.0040.00815.89
7.1.280.0000.01215.61
7.1.270.0070.00415.49
7.1.260.0060.00315.81
7.1.200.0060.00615.89
7.1.70.0070.00016.90
7.1.60.0030.01017.22
7.1.50.0000.01017.04
7.1.40.0030.00716.40
7.1.30.0030.01016.73
7.1.20.0070.00416.58
7.1.10.0000.01016.77
7.1.00.0050.00216.62
7.0.200.0000.00716.88
7.0.190.0050.00316.76
7.0.180.0030.00516.37
7.0.170.0030.00516.30
7.0.160.0040.00416.30
7.0.150.0070.00016.27
7.0.140.0020.00516.36
7.0.130.0000.00816.47
7.0.120.0030.00716.63
7.0.110.0030.00616.32
7.0.100.0090.00016.30
7.0.90.0070.00316.35
7.0.80.0000.00716.21
7.0.70.0000.00816.53
7.0.60.0000.01116.09
7.0.50.0000.01416.46
7.0.40.0030.00315.11
7.0.30.0000.00815.11
7.0.20.0050.00515.11
7.0.10.0000.01015.11
7.0.00.0000.01015.11

preferences:
43.11 ms | 400 KiB | 5 Q