3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Summable { public function getNumericValue(): int; } class One implements Summable { public function getNumericValue(): int { return 1; } } class Two implements Summable { public function getNumericValue(): int { return 2; } } function sumNumbers(Summable ...$numbers): int { return array_reduce($numbers, fn($sum, Summable $number) => $sum += $number->getNumericValue()); } $numbers = [new One, new Two, new Two]; echo sumNumbers(...$numbers);

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.0120.00824.13
8.4.110.0110.01018.90
8.4.100.0110.01018.86
8.4.90.0130.00820.58
8.4.80.0120.00818.83
8.4.70.0060.00317.80
8.4.60.0110.00518.89
8.4.50.0130.00718.59
8.4.40.0150.00617.86
8.4.30.0130.00722.26
8.4.20.0130.00717.70
8.4.10.0030.00619.50
8.3.250.0070.00419.05
8.3.240.0120.00717.14
8.3.230.0140.00516.80
8.3.220.0030.00419.00
8.3.210.0120.00616.49
8.3.200.0090.00916.64
8.3.190.0010.00717.28
8.3.180.0050.00516.46
8.3.170.0130.00619.03
8.3.160.0090.00916.49
8.3.150.0130.00621.04
8.3.140.0040.00717.24
8.3.130.0080.00018.39
8.3.120.0060.00319.22
8.3.110.0040.00420.94
8.3.100.0110.00024.06
8.3.90.0140.00326.77
8.3.80.0030.00618.55
8.3.70.0120.00416.58
8.3.60.0070.00716.75
8.3.50.0120.00616.74
8.3.40.0110.00320.17
8.3.30.0170.00021.61
8.3.20.0000.00724.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0100.00820.71
8.2.280.0100.00818.16
8.2.270.0110.00417.20
8.2.260.0030.00616.96
8.2.250.0050.00516.79
8.2.240.0150.00617.25
8.2.230.0100.00522.58
8.2.220.0030.00637.54
8.2.210.0090.00926.77
8.2.200.0040.00418.29
8.2.190.0070.00718.17
8.2.180.0080.00825.92
8.2.170.0070.01418.96
8.2.160.0090.00622.96
8.2.150.0070.00025.66
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00019.36
8.2.110.0220.00020.38
8.2.100.0130.00019.02
8.2.90.0090.00318.99
8.2.80.0110.01118.74
8.2.70.0140.00318.84
8.2.60.0100.00318.95
8.2.50.0060.00318.90
8.2.40.0040.00718.81
8.2.30.0090.00018.71
8.2.20.0060.00318.66
8.2.10.0110.00018.95
8.2.00.0090.00318.89
8.1.330.0080.00622.27
8.1.320.0110.00918.43
8.1.310.0070.01118.21
8.1.300.0000.01120.25
8.1.290.0030.00630.84
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0030.00526.35
8.1.250.0070.00728.09
8.1.240.0060.00618.61
8.1.230.0070.00318.66
8.1.220.0100.00318.70
8.1.210.0060.00619.91
8.1.200.0040.00818.55
8.1.190.0030.00718.47
8.1.180.0060.00318.55
8.1.170.0090.00018.56
8.1.160.0040.00418.69
8.1.150.0110.00020.55
8.1.140.0100.00018.52
8.1.130.0040.00718.43
8.1.120.0030.00618.73
8.1.110.0090.00018.59
8.1.100.0060.00318.60
8.1.90.0050.00518.67
8.1.80.0040.00718.72
8.1.70.0030.00718.86
8.1.60.0100.00018.63
8.1.50.0070.00418.77
8.1.40.0030.00618.97
8.1.30.0070.00319.00
8.1.20.0030.00718.86
8.1.10.0060.00318.73
8.1.00.0030.00718.78
8.0.300.0050.00517.82
8.0.290.0030.00717.90
8.0.280.0070.00317.62
8.0.270.0030.00617.96
8.0.260.0090.00017.90
8.0.250.0060.00317.84
8.0.240.0100.00017.75
8.0.230.0060.00318.36
8.0.220.0100.00017.94
8.0.210.0100.00017.90
8.0.200.0030.00717.84
8.0.190.0030.00718.00
8.0.180.0060.00317.93
8.0.170.0000.00917.82
8.0.160.0030.00617.99
8.0.150.0090.00018.02
8.0.140.0040.00417.84
8.0.130.0060.00317.95
8.0.120.0090.00017.94
8.0.110.0090.00018.08
8.0.100.0100.00017.95
8.0.90.0060.00317.88
8.0.80.0060.00318.06
8.0.70.0090.00017.88
8.0.60.0060.00317.88
8.0.50.0030.00617.80
8.0.30.0090.00017.91
8.0.20.0070.00317.86
8.0.10.0090.00018.04

preferences:
46.35 ms | 403 KiB | 5 Q