3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ListenerAggregate {} class EM { public function attach($listener) { if($listener instanceof ListenerAggregate){ echo "Attached an aggregate\n"; }else{ echo "Attached regular callable\n"; } } } class SomeAggregateListener implements ListenerAggregate { public function __invoke() { // look ma, I'm a callable! } } $em = new EM; $aggregate = new SomeAggregateListener; $em->attach($aggregate);

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.0100.00718.43
8.3.50.0200.00417.13
8.3.40.0140.00718.63
8.3.30.0100.00718.59
8.3.20.0090.00618.82
8.3.10.0000.00918.51
8.3.00.0070.00417.25
8.2.180.0080.01218.08
8.2.170.0150.00622.96
8.2.160.0140.00318.79
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0060.00319.77
8.2.110.0060.00319.29
8.2.100.0150.00017.72
8.2.90.0030.00617.50
8.2.80.0050.00318.03
8.2.70.0050.00317.63
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0040.00419.47
8.2.30.0170.00017.69
8.2.20.0130.00017.79
8.2.10.0080.00017.55
8.2.00.0030.00717.73
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00019.22
8.1.230.0040.00719.06
8.1.220.0030.00517.79
8.1.210.0030.00518.77
8.1.200.0000.00917.36
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0030.00618.86
8.1.160.0030.00318.94
8.1.150.0040.00418.59
8.1.140.0040.00417.36
8.1.130.0030.00317.44
8.1.120.0050.00317.34
8.1.110.0020.00517.44
8.1.100.0030.00317.41
8.1.90.0000.00817.32
8.1.80.0070.00017.52
8.1.70.0050.00317.43
8.1.60.0080.00017.58
8.1.50.0070.00017.41
8.1.40.0000.00817.54
8.1.30.0040.00417.54
8.1.20.0110.00017.54
8.1.10.0090.00017.54
8.1.00.0070.00417.50
8.0.300.0030.00518.78
8.0.290.0090.00016.75
8.0.280.0000.00718.60
8.0.270.0000.00817.24
8.0.260.0080.00016.82
8.0.250.0030.00616.99
8.0.240.0040.00416.87
8.0.230.0040.00416.98
8.0.220.0040.00416.77
8.0.210.0060.00016.90
8.0.200.0000.00816.93
8.0.190.0040.00416.95
8.0.180.0070.00016.81
8.0.170.0050.00316.91
8.0.160.0030.00316.81
8.0.150.0070.00016.71
8.0.140.0040.00416.77
8.0.130.0050.00013.35
8.0.120.0040.00416.78
8.0.110.0000.00816.89
8.0.100.0050.00316.94
8.0.90.0040.00416.83
8.0.80.0070.01416.81
8.0.70.0000.00816.73
8.0.60.0060.00316.94
8.0.50.0000.00816.75
8.0.30.0030.01317.00
8.0.20.0110.00716.93
8.0.10.0000.00716.96
8.0.00.0080.01516.62
7.4.330.0030.00312.99
7.4.320.0060.00016.62
7.4.300.0060.00016.61
7.4.290.0100.00016.50
7.4.280.0000.00716.57
7.4.270.0050.00316.49
7.4.260.0000.00613.28
7.4.250.0070.00016.58
7.4.240.0040.00416.58
7.4.230.0040.00416.58
7.4.220.0000.01716.68
7.4.210.0030.01316.55
7.4.200.0040.00416.70
7.4.190.0000.00816.74
7.4.160.0060.00916.46
7.4.150.0070.01016.53
7.4.140.0070.01817.86
7.4.130.0030.01416.47
7.4.120.0050.01116.72
7.4.110.0100.00616.53
7.4.100.0060.01016.45
7.4.90.0100.01316.36
7.4.80.0070.01019.39
7.4.70.0180.00316.34
7.4.60.0080.00816.39
7.4.50.0080.00016.46
7.4.40.0060.00916.45
7.4.30.0080.01016.64
7.4.00.0040.01214.71
7.3.330.0050.00313.12
7.3.320.0060.00013.29
7.3.310.0070.00016.29
7.3.300.0030.00416.29
7.3.290.0110.00516.31
7.3.280.0150.00616.29
7.3.270.0070.01016.36
7.3.260.0070.01816.55
7.3.240.0030.01316.36
7.3.230.0100.00716.61
7.3.210.0100.01016.22
7.3.200.0120.00416.43
7.3.190.0050.01116.22
7.3.180.0090.00616.47
7.3.170.0060.00916.38
7.3.160.0040.01116.32
7.3.120.0050.01114.71
7.3.110.0090.00914.93
7.3.100.0060.00814.81
7.3.90.0020.01114.90
7.3.80.0050.00914.84
7.3.70.0060.00614.60
7.3.60.0050.00914.74
7.3.50.0040.00814.88
7.3.40.0050.00814.68
7.3.30.0050.00814.64
7.3.20.0020.01016.53
7.3.10.0080.00516.45
7.3.00.0070.00516.70
7.2.330.0100.00716.60
7.2.320.0080.00816.65
7.2.310.0120.01116.61
7.2.300.0080.00816.38
7.2.290.0090.00916.86
7.2.250.0040.01314.96
7.2.240.0060.01415.12
7.2.230.0080.00514.89
7.2.220.0060.00614.95
7.2.210.0050.01014.96
7.2.200.0040.01014.81
7.2.190.0080.00814.94
7.2.180.0100.00615.02
7.2.170.0060.00614.91
7.2.00.0030.01219.09
7.1.330.0070.00715.76
7.1.320.0070.00615.81
7.1.310.0030.01015.84
7.1.300.0070.00515.73
7.1.290.0080.00615.66
7.1.280.0050.00615.75
7.1.270.0080.00515.77
7.1.260.0050.00815.54
7.1.100.0000.00918.10
7.1.70.0000.00717.28
7.1.60.0070.01619.25
7.1.50.0120.01216.85
7.1.00.0030.06322.27
7.0.200.0030.00616.53
7.0.140.0070.07021.95
7.0.120.0030.07322.05
7.0.60.0030.04019.82
7.0.50.0070.04017.84
7.0.40.0100.03720.18
7.0.30.0330.04720.34
7.0.20.0230.07720.26
7.0.10.0000.04320.24
7.0.00.0130.08720.33
5.6.280.0000.07721.08
5.6.210.0030.04320.48
5.6.200.0030.08718.18
5.6.190.0100.06320.50
5.6.180.0330.07320.52
5.6.170.0230.04320.55
5.6.160.0030.04320.47
5.6.150.0030.08018.18
5.6.140.0030.04018.15
5.6.130.0030.09018.19
5.6.120.0030.04321.00
5.6.110.0130.08320.89
5.6.100.0170.07321.03
5.6.90.0130.07721.07
5.6.80.0030.04320.48
5.6.70.3930.04320.28
5.5.350.0070.08320.30
5.5.340.0070.04317.95
5.5.330.0030.04020.28
5.5.320.0200.08020.27
5.5.310.0300.06020.23
5.5.300.0000.04017.97
5.5.290.0030.05718.08
5.5.280.0030.04320.88
5.5.270.0130.05320.98
5.5.260.0070.07320.87
5.5.250.0100.04020.71
5.5.240.0200.06020.20
5.4.450.0000.06719.18
5.4.440.0030.08019.46
5.4.430.0070.04019.53
5.4.420.0030.04319.17
5.4.410.0030.07019.44
5.4.400.0030.08319.15
5.4.390.0100.07718.86
5.4.380.0070.05019.25
5.4.370.0100.04019.12
5.4.360.0070.04318.85
5.4.350.0030.03718.87
5.4.340.0100.05018.86
5.4.320.0030.08018.92
5.4.310.0030.04319.15
5.4.300.0030.03718.97
5.4.290.0000.08019.08
5.4.280.0070.06319.00
5.4.270.0170.06719.14
5.4.260.0030.04018.86
5.4.250.0130.05018.88
5.4.240.0030.08018.99
5.4.230.0100.06019.23
5.4.220.0000.06719.14
5.4.210.0070.04318.86
5.4.200.0030.04319.14
5.4.190.0070.07319.13
5.4.180.0070.06718.84
5.4.170.0070.04319.14
5.4.160.0030.04319.05
5.4.150.0100.05018.85
5.4.140.0030.04016.55
5.4.130.0100.03016.38
5.4.120.0030.03716.39
5.4.110.0230.03016.50
5.4.100.0030.05316.72
5.4.90.0030.07016.39
5.4.80.0070.04016.44
5.4.70.0100.04316.53
5.4.60.0070.05016.34
5.4.50.0100.06316.51
5.4.40.0070.06716.38
5.4.30.0070.06316.27
5.4.20.0030.04716.52
5.4.10.0000.04716.25
5.4.00.0000.03715.83
5.3.290.0030.07714.67
5.3.280.0030.08014.52
5.3.270.0000.04014.50
5.3.260.0130.06314.65
5.3.250.0070.04714.65
5.3.240.0170.05314.66
5.3.230.0070.03314.75
5.3.220.0000.04014.57
5.3.210.0100.04314.45
5.3.200.0130.06714.62
5.3.190.0030.05014.50
5.3.180.0070.03314.59
5.3.170.0070.06714.57
5.3.160.0030.06714.45
5.3.150.0100.03714.50
5.3.140.0000.04714.55
5.3.130.0030.04314.57
5.3.120.0100.07314.71
5.3.110.0030.04014.58
5.3.100.0070.03714.04
5.3.90.0070.03714.17
5.3.80.0070.04714.03
5.3.70.0100.04714.10
5.3.60.0000.04014.06
5.3.50.0100.05014.03
5.3.40.0070.08014.11
5.3.30.0000.03714.01
5.3.20.0070.06013.59
5.3.10.0000.04013.71
5.3.00.0030.03313.61
5.2.170.0030.03311.20
5.2.160.0030.03711.07
5.2.150.0000.03011.21
5.2.140.0130.06011.15
5.2.130.0070.03011.16
5.2.120.0000.04311.11
5.2.110.0000.03011.11
5.2.100.0070.02311.18
5.2.90.0030.05711.07
5.2.80.0070.05711.17
5.2.70.0030.03311.14
5.2.60.0070.02711.13
5.2.50.0030.03011.18
5.2.40.0000.06011.01
5.2.30.0070.06011.03
5.2.20.0030.04011.03
5.2.10.0100.05010.92
5.2.00.0070.06010.69
5.1.60.0030.03310.05
5.1.50.0070.0439.98
5.1.40.0070.04710.02
5.1.30.0030.03310.49
5.1.20.0100.02010.32
5.1.10.0030.0239.98
5.1.00.0030.0239.98
5.0.50.0070.0439.73
5.0.40.0030.0209.73
5.0.30.0030.0309.73
5.0.20.0030.0179.73
5.0.10.0030.0439.73
5.0.00.0030.0679.73
4.4.90.0000.0179.73
4.4.80.0000.0209.73
4.4.70.0030.0379.73
4.4.60.0000.0409.73
4.4.50.0030.0339.73
4.4.40.0070.0279.73
4.4.30.0000.0309.73
4.4.20.0030.0139.73
4.4.10.0000.0409.73
4.4.00.0070.0509.73
4.3.110.0000.0209.73
4.3.100.0030.0209.73
4.3.90.0030.0339.73
4.3.80.0030.0439.73
4.3.70.0030.0239.73
4.3.60.0000.0179.73
4.3.50.0030.0139.73
4.3.40.0030.0439.73
4.3.30.0030.0139.73
4.3.20.0000.0179.73
4.3.10.0000.0179.73
4.3.00.0000.0179.73

preferences:
47.44 ms | 401 KiB | 5 Q