3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Proto { interface A { public function aaa(); } class Foo implements A { public function aaa() { return 'aaa'; } } } $i = 10000; $className = Proto\Foo::class; while ($i--) { $interfaces = class_implements($className); if (false === $interfaces || !isset($interfaces[Proto\A::class])) { throw new \Exception(sprintf('Class "%s" should implement "%s"', $className, Proto\A::class)); } } echo 'ok', 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)
5.4.350.0230.04319.31
5.4.340.0230.03319.20
5.4.320.0170.04019.00
5.4.310.0200.04319.17
5.4.300.0230.03018.99
5.4.290.0130.03718.95
5.4.280.0130.04019.23
5.4.270.0170.04019.06
5.4.260.0270.03019.30
5.4.250.0100.04718.80
5.4.240.0230.03019.05
5.4.230.0200.03318.99
5.4.220.0170.04019.26
5.4.210.0230.03719.15
5.4.200.0170.03719.19
5.4.190.0170.03719.22
5.4.180.0130.03719.23
5.4.170.0130.04019.05
5.4.160.0200.03718.96
5.4.150.0300.02719.17
5.4.140.0100.04316.39
5.4.130.0130.03716.38
5.4.120.0200.04316.38
5.4.110.0170.03716.50
5.4.100.0130.03716.24
5.4.90.0170.03716.30
5.4.80.0170.03316.29
5.4.70.0200.03316.57
5.4.60.0130.03716.55
5.4.50.0100.04016.51
5.4.40.0230.02716.38
5.4.30.0170.04016.38
5.4.20.0170.03316.37
5.4.10.0170.03716.39
5.4.00.0200.03315.96
5.3.290.0100.04314.68
5.3.280.0200.03314.52
5.3.270.0200.03714.70
5.3.260.0130.04014.75
5.3.250.0100.04014.66
5.3.240.0200.04314.75
5.3.230.0170.03714.61
5.3.220.0230.03714.57
5.3.210.0130.04714.80
5.3.200.0230.04014.79
5.3.190.0270.03714.59
5.3.180.0170.04014.48
5.3.170.0170.03714.50
5.3.160.0200.03314.54
5.3.150.0170.03714.68
5.3.140.0200.03714.47
5.3.130.0130.03714.56
5.3.120.0200.03314.54
5.3.110.0200.03314.57
5.3.100.0200.03014.16
5.3.90.0170.03313.94
5.3.80.0200.07014.13
5.3.70.0230.03314.04
5.3.60.0270.03314.02
5.3.50.0230.04013.86
5.3.40.0170.05013.85
5.3.30.0270.05713.99
5.3.20.0230.05713.59
5.3.10.0130.04313.66
5.3.00.0270.06313.63
5.2.170.0170.04012.23
5.2.160.0230.04712.23
5.2.150.0300.04012.23
5.2.140.0130.03312.23
5.2.130.0200.03312.23
5.2.120.0200.05312.23
5.2.110.0200.05712.23
5.2.100.0200.06012.23
5.2.90.0230.05012.23
5.2.80.0200.06012.23
5.2.70.0270.04012.23
5.2.60.0300.05312.23
5.2.50.0300.03012.23
5.2.40.0270.04712.23
5.2.30.0170.03012.23
5.2.20.0100.03312.23
5.2.10.0200.05312.23
5.2.00.0300.04012.23
5.1.60.0170.03012.23
5.1.50.0170.05312.23
5.1.40.0200.02312.23
5.1.30.0170.04012.23
5.1.20.0230.04012.23
5.1.10.0230.05012.23
5.1.00.0200.03012.23
5.0.50.0100.02312.23
5.0.40.0170.04012.23
5.0.30.0130.04312.23
5.0.20.0070.02312.23
5.0.10.0070.01712.23
5.0.00.0100.03712.23
4.4.90.0100.03312.23
4.4.80.0070.02012.23
4.4.70.0070.02712.23
4.4.60.0030.02012.23
4.4.50.0070.03012.23
4.4.40.0070.03312.23
4.4.30.0070.01712.23
4.4.20.0070.02712.23
4.4.10.0070.03012.23
4.4.00.0130.02312.23
4.3.110.0070.03712.23
4.3.100.0070.01712.23
4.3.90.0070.03012.23
4.3.80.0070.02712.23
4.3.70.0070.01712.23
4.3.60.0070.02012.23
4.3.50.0070.01712.23
4.3.40.0100.03312.23
4.3.30.0030.02012.23
4.3.20.0030.02012.23
4.3.10.0030.03312.23
4.3.00.0100.02012.23

preferences:
143.37 ms | 1394 KiB | 7 Q