3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Step 1: Set the cookie BEFORE any HTML output setcookie("abc", "abc_value", time() + 3600); // expires in 1 hour ?> <!DOCTYPE html> <html> <head> <title>PHP Cookie Example</title> </head> <body> <?php // Step 2: Check if cookie is set and display message if (isset($_COOKIE['abc'])) { echo "Hello, visiting again! Cookie value: " . $_COOKIE['abc']; } else { echo "Your first visit."; } ?> </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)
8.4.70.0410.00817.72
8.4.60.0390.01017.48
8.4.50.0370.01117.62
8.4.40.0470.00917.41
8.4.30.0370.01117.41
8.4.20.0400.00917.49
8.4.10.0420.00817.65
8.3.210.0290.01016.57
8.3.200.0350.00816.52
8.3.190.0370.01116.26
8.3.180.0200.00416.38
8.3.170.0390.00916.57
8.3.160.0370.01016.69
8.3.150.0380.00816.29
8.3.140.0370.00916.41
8.3.130.0120.00716.55
8.3.120.0340.00816.42
8.3.110.0310.01216.57
8.3.100.0420.00616.59
8.3.90.0400.00816.48
8.3.80.0400.00716.46
8.3.70.0400.00616.58
8.3.60.0370.00616.24
8.3.50.0400.00816.34
8.3.40.0310.00917.36
8.3.30.0290.00917.38
8.3.20.0320.00617.64
8.3.10.0330.00417.49
8.3.00.0190.01017.69
8.2.280.0280.00816.27
8.2.270.0340.00716.71
8.2.260.0240.01116.39
8.2.250.0300.00916.61
8.2.240.0320.00516.36
8.2.230.0340.01016.47
8.2.220.0330.00716.38
8.2.210.0270.00616.37
8.2.200.0210.00516.44
8.2.190.0260.00616.20
8.2.180.0290.00616.28
8.2.170.0280.00517.60
8.2.160.0390.00317.73
8.2.150.0330.01017.59
8.2.140.0330.00917.64
8.2.130.0310.00917.61
8.2.120.0280.00817.63
8.2.110.0280.01017.68
8.2.100.0330.00917.70
8.2.90.0310.01017.81
8.2.80.0340.00717.68
8.2.70.0300.01117.54
8.2.60.0280.00817.62
8.2.50.0140.00917.49
8.2.40.0140.00217.73
8.2.30.0320.00717.67
8.2.20.0380.00417.51
8.2.10.0330.00617.47
8.2.00.0360.00717.45

preferences:
34.15 ms | 403 KiB | 5 Q