3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nums = array(1, 7, 8, 9); $key = array_rand($nums); echo $nums[$key] . PHP_EOL; shuffle($nums); echo $nums[0] . PHP_EOL;

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.120.0460.00617.66
8.4.110.0390.01017.70
8.4.100.0430.01017.48
8.4.90.0360.00517.64
8.4.80.0200.00617.72
8.4.70.0370.00517.70
8.4.60.0440.00917.61
8.4.50.0420.01017.63
8.4.40.0270.00617.60
8.4.30.0360.00617.32
8.4.20.0270.00717.60
8.4.10.0290.00417.31
8.3.250.0170.00716.47
8.3.240.0180.00416.60
8.3.230.0190.00416.36
8.3.220.0200.00316.67
8.3.210.0190.00416.46
8.3.200.0170.00716.43
8.3.190.0220.00416.26
8.3.180.0180.00416.16
8.3.170.0220.00216.25
8.3.160.0360.00416.70
8.3.150.0320.00716.33
8.3.140.0290.00816.57
8.3.130.0180.00316.48
8.3.120.0240.00216.34
8.3.110.0170.00416.53
8.3.100.0380.00916.44
8.3.90.0390.01016.46
8.3.80.0400.00816.19
8.3.70.0430.00716.39
8.3.60.0290.00616.54
8.3.50.0370.00516.19
8.3.40.0290.00817.48
8.3.30.0360.00517.44
8.3.20.0280.01117.41
8.3.10.0350.00517.64
8.3.00.0340.00917.31
8.2.290.0290.00716.40
8.2.280.0280.01216.70
8.2.270.0320.00916.72
8.2.260.0330.00516.51
8.2.250.0310.01016.39
8.2.240.0350.00716.43
8.2.230.0340.00716.22
8.2.220.0300.00716.37
8.2.210.0280.01015.94
8.2.200.0340.00716.52
8.2.190.0290.00916.28
8.2.180.0360.00915.99
8.2.170.0420.00917.82
8.2.160.0260.00517.67
8.2.150.0140.00617.72
8.2.140.0200.00117.68
8.2.130.0190.00217.62
8.2.120.0350.00917.57
8.2.110.0200.00919.89
8.2.100.0190.00519.07
8.2.90.0220.00419.05
8.2.80.0120.00519.01
8.2.70.0140.00718.98
8.2.60.0120.01418.98
8.2.50.0280.00419.00
8.2.40.0230.01019.12
8.2.30.0230.00918.91
8.2.20.0160.00619.03
8.2.10.0220.00919.01
8.2.00.0150.00519.09
8.1.330.0140.00516.31
8.1.320.0280.01115.91
8.1.310.0270.00415.99
8.1.300.0260.00816.03
8.1.290.0360.00516.04
8.1.280.0320.00816.22
8.1.270.0470.00717.26
8.1.260.0350.00417.32
8.1.250.0310.00917.42
8.1.240.0160.01518.90
8.1.230.0240.01018.90
8.1.220.0230.00419.70
8.1.210.0220.00419.35
8.1.200.0100.00918.81
8.1.190.0210.00718.56
8.1.180.0190.00518.64
8.1.170.0160.00818.78
8.1.160.0140.01018.94
8.1.150.0170.01018.85
8.1.140.0200.00718.75
8.1.130.0220.00718.72
8.1.120.0190.00618.95
8.1.110.0160.00718.81
8.1.100.0170.01318.74
8.1.90.0180.00718.67
8.1.80.0200.00818.74
8.1.70.0150.00718.90
8.1.60.0210.00618.84
8.1.50.0170.00518.85
8.1.40.0220.00819.00
8.1.30.0230.00818.93
8.1.20.0170.00618.98
8.1.10.0170.00318.92
8.1.00.0240.00618.88
8.0.300.0230.00518.08
8.0.290.0210.00618.16
8.0.280.0120.00518.11
8.0.270.0160.00818.12
8.0.260.0160.00618.18
8.0.250.0110.00318.27
8.0.240.0090.00518.26
8.0.230.0240.00418.49
8.0.220.0120.00718.18
8.0.210.0140.00518.01
8.0.200.0210.00318.13
8.0.190.0230.00518.20
8.0.180.0180.00818.19
8.0.170.0190.00918.28
8.0.160.0220.00418.25
8.0.150.0160.00718.06
8.0.140.0140.01017.99
8.0.130.0190.00617.97
8.0.120.0200.00718.08
8.0.110.0160.00418.12
8.0.100.0150.00418.08
8.0.90.0180.00618.06
8.0.80.0180.01218.01
8.0.70.0170.00418.11
8.0.60.0100.00418.23
8.0.50.0120.00718.02
8.0.30.0130.00717.99
8.0.20.0160.00718.10
8.0.10.0130.00918.20
8.0.00.0090.01118.58
7.4.330.0160.00515.37
7.4.320.0140.00717.80
7.4.300.0270.00317.79
7.4.290.0230.00417.88
7.4.280.0210.00717.75
7.4.270.0190.00817.74
7.4.260.0150.01317.73
7.4.250.0170.01117.81
7.4.240.0210.00817.79
7.4.230.0290.00217.78
7.4.220.0200.00617.67
7.4.210.0200.00717.70
7.4.200.0220.00717.67
7.4.190.0240.00717.94
7.4.180.0180.00617.93
7.4.160.0090.00817.92
7.4.150.0170.00417.75
7.4.140.0210.00417.75
7.4.130.0190.00617.69
7.4.120.0130.00417.72
7.4.110.0240.00316.64
7.4.100.0230.00616.67
7.4.90.0290.00916.78
7.4.80.0300.00616.71
7.4.70.0280.00816.80
7.4.60.0240.00716.75
7.4.50.0220.01116.71
7.4.40.0170.00416.59
7.4.30.0210.00616.73
7.4.20.0240.00516.65
7.4.10.0270.00816.71
7.4.00.0140.00616.12
7.3.330.0160.00517.48
7.3.320.0170.00816.47
7.3.310.0200.00616.59
7.3.300.0240.00616.55
7.3.290.0210.00716.45
7.3.280.0290.00716.41
7.3.270.0290.00516.68
7.3.260.0290.01016.46
7.3.250.0280.00816.56
7.3.240.0280.00416.52
7.3.230.0240.00316.47
7.3.220.0320.00416.43
7.3.210.0210.00616.42
7.3.200.0190.00616.56
7.3.190.0190.00616.60
7.3.180.0270.00216.65
7.3.170.0220.00616.43
7.3.160.0350.00316.52
7.3.150.0310.00716.60
7.3.140.0260.00216.50
7.3.130.0220.00216.29
7.3.120.0160.00915.80
7.3.110.0180.00615.96
7.3.100.0210.00515.67
7.3.90.0270.00416.03
7.3.80.0200.00915.85
7.3.70.0190.00615.88
7.3.60.0190.00416.14
7.3.50.0180.00916.03
7.3.40.0160.00515.55
7.3.30.0110.00615.64
7.3.20.0190.00917.09
7.3.10.0180.00817.04
7.3.00.0110.00417.07
7.2.340.0200.00717.42
7.2.330.0320.00716.76
7.2.320.0270.01016.62
7.2.310.0280.00716.47
7.2.300.0190.00716.75
7.2.290.0310.00416.82
7.2.280.0320.00416.67
7.2.270.0220.00516.59
7.2.260.0240.00316.70
7.2.250.0210.00516.25
7.2.240.0260.00415.99
7.2.230.0210.00216.09
7.2.220.0190.00416.09
7.2.210.0190.00916.16
7.2.200.0150.01016.28
7.2.190.0210.00416.09
7.2.180.0150.00316.11
7.2.170.0080.00915.89
7.2.160.0170.00315.94
7.2.150.0190.00617.42
7.2.140.0160.00417.44
7.2.130.0110.00817.41
7.2.120.0150.00517.46
7.2.110.0200.00317.54
7.2.100.0230.00717.41
7.2.90.0210.00617.36
7.2.80.0190.00417.47
7.2.70.0210.00817.39
7.2.60.0180.00717.51
7.2.50.0150.00417.53
7.2.40.0200.00417.53
7.2.30.0200.00417.43
7.2.20.0170.00717.34
7.2.10.0180.01017.63
7.2.00.0160.00817.64
7.1.330.0120.00716.48
7.1.320.0180.00416.30
7.1.310.0180.00416.42
7.1.300.0240.00716.47
7.1.290.0110.00616.47
7.1.280.0080.00716.21
7.1.270.0080.00716.22
7.1.260.0100.00716.23
7.1.250.0110.00516.42
7.1.240.0320.00716.74
7.1.230.0300.00716.73
7.1.220.0280.00816.93
7.1.210.0220.00516.87
7.1.200.0180.00516.99
7.1.190.0210.00516.95
7.1.180.0190.00716.89
7.1.170.0200.00516.80
7.1.160.0230.00416.66
7.1.150.0280.00716.76
7.1.140.0260.00416.82
7.1.130.0280.00616.62
7.1.120.0230.00316.88
7.1.110.0240.00616.58
7.1.100.0210.00516.52
7.1.90.0160.00516.65
7.1.80.0360.00416.77
7.1.70.0160.00216.28
7.1.60.0180.00216.55
7.1.50.0150.00216.54
7.1.40.0140.00316.79
7.1.30.0140.00416.56
7.1.20.0140.00516.76
7.1.10.0110.00716.60
7.1.00.0140.00316.67

preferences:
18.32 ms | 403 KiB | 5 Q