3v4l.org

run code in 300+ PHP versions simultaneously
<?php class EventDispatcher{function r($e, ListenerInterface $l){$this->e[$e][] = $l;} function d($e){foreach ($this->e[$e] as $l){$l->o();}}} interface ListenerInterface{function o();} class MyListener{function o(){echo '*';}} $l = new MyListener(); $e = new EventDispatcher(); $e->r('1', $l); $e->r('1', $l); $e->r('2', $l); $e->d();

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.3.60.0070.00718.43
8.3.50.0200.00822.05
8.3.40.0090.00618.84
8.3.30.0000.01419.08
8.3.20.0080.00020.16
8.3.10.0080.00021.93
8.3.00.0040.00422.51
8.2.180.0110.00416.63
8.2.170.0040.01122.96
8.2.160.0070.00720.87
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0050.00317.75
8.2.110.0030.00622.25
8.2.100.0120.00017.66
8.2.90.0040.00419.23
8.2.80.0000.00819.66
8.2.70.0060.00317.50
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0000.00717.89
8.2.20.0000.00717.74
8.2.10.0030.00519.47
8.2.00.0000.00717.58
8.1.280.0100.00725.92
8.1.270.0080.00022.09
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.86
8.1.230.0040.00718.88
8.1.220.0000.00917.74
8.1.210.0060.00318.77
8.1.200.0030.00717.12
8.1.190.0000.00717.30
8.1.180.0050.00318.10
8.1.170.0000.00818.56
8.1.160.0040.00422.02
8.1.150.0040.00418.56
8.1.140.0000.00717.28
8.1.130.0000.00717.91
8.1.120.0000.00717.34
8.1.110.0060.00317.43
8.1.100.0000.00717.39
8.1.90.0040.00417.25
8.1.80.0070.00017.47
8.1.70.0070.00017.27
8.1.60.0030.00517.66
8.1.50.0030.00617.43
8.1.40.0040.00417.43
8.1.30.0080.00017.56
8.1.20.0080.00017.62
8.1.10.0090.00017.48
8.1.00.0000.00717.42
8.0.300.0070.00018.77
8.0.290.0040.00417.05
8.0.280.0000.00718.29
8.0.270.0070.00017.22
8.0.260.0060.00016.83
8.0.250.0000.00716.88
8.0.240.0030.00316.96
8.0.230.0030.00316.98
8.0.220.0000.00816.92
8.0.210.0050.00216.93
8.0.200.0000.00616.84
8.0.190.0000.00816.99
8.0.180.0040.00416.83
8.0.170.0040.00416.95
8.0.160.0030.00616.86
8.0.150.0040.00416.74
8.0.140.0080.00016.86
8.0.130.0030.00313.33
8.0.120.0050.00316.88
8.0.110.0040.00416.87
8.0.100.0040.00416.84
8.0.90.0050.00316.95
8.0.80.0100.01016.88
8.0.70.0080.00016.87
8.0.60.0040.00416.73
8.0.50.0040.00416.93
8.0.30.0080.01117.05
8.0.20.0100.00817.40
8.0.10.0000.00816.86
8.0.00.0050.01216.82
7.4.330.0060.00015.00
7.4.320.0000.00616.42
7.4.300.0070.00016.58
7.4.290.0030.00616.63
7.4.280.0000.00716.53
7.4.270.0030.00316.54
7.4.260.0000.00716.65
7.4.250.0030.00416.39
7.4.240.0070.00016.51
7.4.230.0000.00716.63
7.4.220.0150.00416.45
7.4.210.0080.00716.54
7.4.200.0070.00016.72
7.4.190.0040.00416.47
7.4.160.0100.01316.74
7.4.150.0060.01117.40
7.4.140.0090.00817.86
7.4.130.0090.01016.54
7.4.120.0110.00616.71
7.4.110.0100.01016.56
7.4.100.0100.01016.66
7.4.90.0070.01016.50
7.4.80.0100.01019.39
7.4.70.0100.00716.53
7.4.60.0100.00616.57
7.4.50.0040.00416.56
7.4.40.0060.00622.77
7.4.30.0030.01316.59
7.4.00.0030.01314.78
7.3.330.0050.00013.34
7.3.320.0050.00013.46
7.3.310.0070.00016.20
7.3.300.0030.00316.40
7.3.290.0110.00416.33
7.3.280.0120.00616.37
7.3.270.0070.01317.40
7.3.260.0090.00916.62
7.3.250.0130.00816.39
7.3.240.0100.01016.35
7.3.230.0100.00616.58
7.3.210.0170.00316.62
7.3.200.0100.00716.29
7.3.190.0150.00616.52
7.3.180.0090.00616.58
7.3.170.0100.00716.66
7.3.160.0100.01016.45
7.3.120.0040.01114.86
7.2.330.0060.01116.41
7.2.320.0080.00916.29
7.2.310.0100.00716.54
7.2.300.0090.01316.59
7.2.290.0090.00916.60
7.2.60.0100.00316.72
7.2.00.0090.00318.96
7.1.200.0090.00015.77
7.1.100.0030.01017.91
7.1.70.0040.00417.02
7.1.60.0060.01919.82
7.1.50.0180.00716.90
7.1.00.0030.07722.54
7.0.200.0130.00316.75
7.0.140.0070.07022.09
7.0.60.0100.07020.04
7.0.50.0030.04717.90
7.0.40.0030.05019.97
7.0.30.0300.07320.15
7.0.20.0200.05020.16
7.0.10.0070.08320.21
7.0.00.0130.03720.06
5.6.280.0070.07020.87
5.6.210.0000.04320.66
5.6.200.0130.07718.15
5.6.190.0070.04020.52
5.6.180.0130.05020.77
5.6.170.0300.04020.57
5.6.160.0070.08320.46
5.6.150.0070.07318.14
5.6.140.0030.05018.18
5.6.130.0070.04018.21
5.6.120.0100.07721.14
5.6.110.0200.08321.02
5.6.100.0030.04021.02
5.6.90.0070.06321.13
5.6.80.0030.05020.54
5.5.350.0000.08320.41
5.5.340.0100.08018.08
5.5.330.0100.05020.19
5.5.320.0270.04320.28
5.5.310.0230.05020.35
5.5.300.0070.06317.95
5.5.290.0100.07717.99
5.5.280.0170.06020.88
5.5.270.0130.06020.77
5.5.260.0100.05020.77
5.5.250.0070.03720.69
5.5.240.0000.03320.17
5.4.450.0700.07019.45
5.4.440.0630.05719.32
5.4.430.0070.08019.38
5.4.420.0000.06319.52
5.4.410.0270.04318.98
5.4.400.0100.05718.79
5.4.390.0200.06718.52
5.4.380.0230.05718.77
5.4.370.0270.04318.75
5.4.360.0230.06018.78
5.4.350.0230.05718.75
5.4.340.0270.05318.84
5.4.320.0070.03612.50
5.4.310.0060.03812.50
5.4.300.0070.04012.51
5.4.290.0050.04712.50
5.4.280.0060.03612.40
5.4.270.0090.03612.37
5.4.260.0060.03912.37
5.4.250.0070.03712.37
5.4.240.0040.04012.36
5.4.230.0080.03712.36
5.4.220.0060.04112.36
5.4.210.0060.03712.36
5.4.200.0090.05612.36
5.4.190.0050.04412.36
5.4.180.0090.05012.36
5.4.170.0060.04312.36
5.4.160.0040.04112.36
5.4.150.0060.05012.36
5.4.140.0070.05112.04
5.4.130.0070.03612.02
5.4.120.0060.03711.98
5.4.110.0040.04011.98
5.4.100.0060.03811.98
5.4.90.0070.04011.98
5.4.80.0040.04111.98
5.4.70.0100.03411.98
5.4.60.0050.03611.98
5.4.50.0090.03911.98
5.4.40.0070.03411.97
5.4.30.0040.03911.96
5.4.20.0030.03911.96
5.4.10.0040.04111.96
5.4.00.0030.04011.45
5.3.290.0060.04112.80
5.3.280.0090.05112.71
5.3.270.0120.03812.73
5.3.260.0060.04312.72
5.3.250.0150.03912.72
5.3.240.0080.04512.72
5.3.230.0060.04312.71
5.3.220.0050.04112.68
5.3.210.0050.04212.68
5.3.200.0130.04912.68
5.3.190.0080.05212.68
5.3.180.0080.03812.68
5.3.170.0070.04012.67
5.3.160.0100.04812.67
5.3.150.0080.04612.67
5.3.140.0090.05112.66
5.3.130.0070.04412.66
5.3.120.0110.03912.66
5.3.110.0070.04012.66
5.3.100.0060.04112.12
5.3.90.0100.03412.08
5.3.80.0060.04112.08
5.3.70.0080.03612.08
5.3.60.0070.03712.06
5.3.50.0060.03912.00
5.3.40.0060.03912.00
5.3.30.0050.03711.96
5.3.20.0070.04011.74
5.3.10.0040.03811.70
5.3.00.0120.03911.70
5.2.170.0050.0319.19
5.2.160.0050.0299.20
5.2.150.0030.0369.20
5.2.140.0090.0389.19
5.2.130.0090.0299.15
5.2.120.0080.0389.16
5.2.110.0080.0349.16
5.2.100.0090.0419.15
5.2.90.0110.0359.15
5.2.80.0070.0419.14
5.2.70.0090.0329.13
5.2.60.0050.0329.10
5.2.50.0060.0339.07
5.2.40.0060.0329.05
5.2.30.0050.0379.02
5.2.20.0040.0339.02
5.2.10.0060.0398.93
5.2.00.0050.0418.77
5.1.60.0080.0318.07
5.1.50.0080.0288.07
5.1.40.0050.0288.04
5.1.30.0070.0338.39
5.1.20.0030.0308.42
5.1.10.0050.0298.15
5.1.00.0030.0288.14
5.0.50.0040.0206.62
5.0.40.0030.0206.48
5.0.30.0020.0336.29
5.0.20.0050.0226.26
5.0.10.0060.0176.24
5.0.00.0020.0336.23
4.4.90.0040.0144.78
4.4.80.0020.0194.75
4.4.70.0060.0134.76
4.4.60.0020.0164.75
4.4.50.0030.0164.77
4.4.40.0040.0284.71
4.4.30.0020.0174.76
4.4.20.0030.0164.84
4.4.10.0040.0164.85
4.4.00.0030.0254.76
4.3.110.0040.0194.67
4.3.100.0000.0224.67
4.3.90.0040.0214.63
4.3.80.0020.0324.59
4.3.70.0020.0164.63
4.3.60.0060.0184.63
4.3.50.0080.0164.63
4.3.40.0050.0244.54
4.3.30.0040.0153.29
4.3.20.0020.0173.27
4.3.10.0030.0183.23
4.3.00.0170.0206.99

preferences:
39.58 ms | 401 KiB | 5 Q