3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mediator { protected $events = array(); public function attach($eventName, $callback) { $this->events[$eventName][] = $callback; } public function trigger($eventName, $data = null) { foreach ($this->events[$eventName] as $callback) { $callback($eventName, $data); } } } ?>

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.40.0090.00618.59
8.3.30.0110.00318.72
8.3.20.0040.00418.68
8.3.10.0000.00918.47
8.3.00.0000.00819.25
8.2.170.0140.00722.96
8.2.160.0100.00718.84
8.2.150.0090.00024.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0060.00320.60
8.2.110.0100.00021.05
8.2.100.0170.00017.78
8.2.90.0030.00618.85
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0000.00817.55
8.2.40.0040.00419.13
8.2.30.0090.00017.62
8.2.20.0110.00017.57
8.2.10.0050.00317.41
8.2.00.0050.00217.46
8.1.270.0080.00023.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0080.00022.77
8.1.230.0040.00717.70
8.1.220.0000.00717.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0080.00017.11
8.1.180.0030.00618.10
8.1.170.0030.00617.62
8.1.160.0030.00318.96
8.1.150.0000.00718.52
8.1.140.0070.00017.33
8.1.130.0030.00317.38
8.1.120.0000.00717.23
8.1.110.0000.00717.36
8.1.100.0020.00517.20
8.1.90.0040.00417.32
8.1.80.0030.00317.39
8.1.70.0000.00717.27
8.1.60.0060.00317.35
8.1.50.0000.00717.34
8.1.40.0090.00017.43
8.1.30.0090.00017.55
8.1.20.0000.00717.60
8.1.10.0040.00417.30
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0000.00816.58
8.0.280.0000.00718.48
8.0.270.0030.00317.21
8.0.260.0000.00616.68
8.0.250.0000.00716.77
8.0.240.0070.00016.82
8.0.230.0030.00316.72
8.0.220.0030.00616.73
8.0.210.0000.00816.73
8.0.200.0040.00416.70
8.0.190.0080.00016.79
8.0.180.0050.00516.73
8.0.170.0000.00816.64
8.0.160.0030.00316.79
8.0.150.0000.00716.68
8.0.140.0000.00916.61
8.0.130.0050.00013.23
8.0.120.0030.00716.64
8.0.110.0030.00516.83
8.0.100.0070.00016.80
8.0.90.0050.00316.77
8.0.80.0120.00316.79
8.0.70.0000.00816.80
8.0.60.0040.00416.55
8.0.50.0040.00416.71
8.0.30.0160.00617.18
8.0.20.0050.01416.88
8.0.10.0000.00716.74
8.0.00.0110.00816.55
7.4.330.0020.00212.97
7.4.320.0030.00316.45
7.4.300.0000.00716.48
7.4.290.0040.00416.38
7.4.280.0000.00716.39
7.4.270.0060.00016.40
7.4.260.0000.00513.17
7.4.250.0000.00916.41
7.4.240.0000.00716.49
7.4.230.0070.00316.31
7.4.220.0160.01016.44
7.4.210.0040.01516.43
7.4.200.0000.00816.50
7.4.190.0000.00716.55
7.4.160.0090.00616.34
7.4.150.0100.00716.35
7.4.140.0090.00916.35
7.4.130.0030.01316.27
7.4.120.0130.00316.39
7.4.110.0060.01216.38
7.4.100.0100.00716.23
7.4.90.0070.01016.32
7.4.80.0060.01119.39
7.4.70.0090.00916.21
7.4.60.0030.01316.34
7.4.50.0000.00916.21
7.4.40.0040.00716.39
7.4.30.0070.01016.30
7.4.00.0050.01214.78
7.3.330.0000.00713.16
7.3.320.0000.00513.02
7.3.310.0030.00316.07
7.3.300.0030.00316.18
7.3.290.0090.00616.13
7.3.280.0120.00516.13
7.3.270.0070.01016.39
7.3.260.0110.00816.43
7.3.250.0110.00716.13
7.3.240.0110.00616.39
7.3.230.0100.01016.42
7.3.210.0110.00616.21
7.3.200.0110.00616.53
7.3.190.0120.00516.33
7.3.180.0150.00016.16
7.3.170.0070.00716.22
7.3.160.0120.00616.42
7.3.120.0060.01114.67
7.3.110.0070.01014.56
7.3.100.0070.01014.62
7.3.90.0030.01014.84
7.3.80.0140.00014.47
7.3.70.0000.01314.40
7.3.60.0110.00414.61
7.3.50.0050.00514.50
7.3.40.0000.01514.67
7.3.30.0080.00614.70
7.3.20.0070.00716.44
7.3.10.0090.00616.43
7.3.00.0060.00616.41
7.2.330.0070.00916.23
7.2.320.0060.01216.21
7.2.310.0060.01516.48
7.2.300.0140.00716.53
7.2.290.0070.01316.60
7.2.250.0050.01014.48
7.2.240.0060.01314.70
7.2.230.0000.01714.59
7.2.220.0040.01114.95
7.2.210.0090.00914.72
7.2.200.0120.00415.00
7.2.190.0100.00614.57
7.2.180.0030.00714.95
7.2.170.0000.01414.49
7.2.160.0060.00914.76
7.2.150.0040.01116.85
7.2.140.0030.00716.40
7.2.130.0000.01416.58
7.2.120.0030.00616.58
7.2.110.0080.00316.51
7.2.100.0030.01116.86
7.2.90.0040.01116.80
7.2.80.0060.00616.80
7.2.70.0100.00016.46
7.2.60.0030.00916.71
7.2.50.0070.01016.39
7.2.40.0000.00916.60
7.2.30.0030.01016.84
7.2.20.0060.00616.68
7.2.10.0070.00716.85
7.2.00.0080.00518.05
7.1.330.0070.00715.46
7.1.320.0060.00615.75
7.1.310.0030.01415.71
7.1.300.0060.00915.41
7.1.290.0030.01015.33
7.1.280.0140.00015.48
7.1.270.0090.00615.60
7.1.260.0080.00815.51
7.1.250.0040.01115.57
7.1.240.0000.01515.60
7.1.230.0040.00815.60
7.1.220.0030.01015.57
7.1.210.0000.01415.37
7.1.200.0030.01015.55
7.1.190.0060.00615.63
7.1.180.0100.00315.61
7.1.170.0070.00715.50
7.1.160.0080.00315.45
7.1.150.0000.01015.52
7.1.140.0040.01115.57
7.1.130.0060.00615.29
7.1.120.0030.01015.55
7.1.110.0110.00415.45
7.1.100.0030.01016.50
7.1.90.0080.00315.49
7.1.80.0030.00715.59
7.1.70.0030.00816.26
7.1.60.0110.00917.44
7.1.50.0050.01616.13
7.1.40.0040.01115.55
7.1.30.0090.00615.50
7.1.20.0090.00015.65
7.1.10.0000.01215.57
7.1.00.0060.02518.83
7.0.330.0040.00814.93
7.0.320.0070.00715.29
7.0.310.0030.01015.22
7.0.300.0080.00415.13
7.0.290.0060.00515.38
7.0.280.0070.00715.23
7.0.270.0090.00315.07
7.0.260.0030.00915.32
7.0.250.0070.00715.05
7.0.240.0100.00315.29
7.0.230.0070.00415.38
7.0.220.0040.00815.05
7.0.210.0070.00715.18
7.0.200.0020.00716.00
7.0.190.0070.00314.84
7.0.180.0060.00914.97
7.0.170.0070.00715.13
7.0.160.0060.00614.93
7.0.150.0060.00915.39
7.0.140.0030.04318.56
7.0.130.0130.00315.43
7.0.120.0080.03818.67
7.0.110.0030.01015.36
7.0.100.0110.00415.00
7.0.90.0030.00615.38
7.0.80.0060.00815.01
7.0.70.0040.01115.05
7.0.60.0060.02917.68
7.0.50.0050.04216.60
7.0.40.0050.03016.65
7.0.30.0160.03616.57
7.0.20.0160.02416.74
7.0.10.0070.02716.65
7.0.00.0050.03716.68
5.6.400.0070.00714.11
5.6.390.0070.00714.16
5.6.380.0030.00614.16
5.6.370.0090.00614.31
5.6.360.0060.00614.03
5.6.350.0000.01013.66
5.6.340.0100.00314.32
5.6.330.0000.00913.79
5.6.320.0040.00714.00
5.6.310.0060.00914.37
5.6.300.0100.00314.13
5.6.290.0100.00714.00
5.6.280.0080.03517.48
5.6.270.0030.00714.30
5.6.260.0100.00714.36
5.6.250.0070.00314.36
5.6.240.0030.01114.13
5.6.230.0000.01513.88
5.6.220.0070.00713.91
5.6.210.0060.03317.39
5.6.200.0070.04716.19
5.6.190.0040.02517.49
5.6.180.0180.04017.28
5.6.170.0170.02517.34
5.6.160.0020.02917.15
5.6.150.0090.04216.15
5.6.140.0050.04616.17
5.6.130.0070.04216.19
5.6.120.0080.03717.56
5.6.110.0050.04817.47
5.6.100.0040.02517.45
5.6.90.0060.02117.42
5.6.80.0150.03717.37
5.6.70.0030.00714.01
5.6.60.0060.00614.18
5.6.50.0100.00014.00
5.6.40.0040.01114.09
5.6.30.0150.00013.80
5.6.20.0070.00414.16
5.6.10.0100.00313.98
5.6.00.0070.01014.02
5.5.380.0060.00914.31
5.5.370.0090.00314.33
5.5.360.0030.01014.20
5.5.350.1710.02017.00
5.5.340.0070.03016.13
5.5.330.0030.02617.19
5.5.320.0210.01717.03
5.5.310.0220.04217.10
5.5.300.0070.03415.99
5.5.290.0070.02316.08
5.5.280.0080.02717.50
5.5.270.0090.03817.36
5.5.260.0100.04017.27
5.5.250.0070.04517.18
5.5.240.0070.03717.02
5.5.230.0080.00414.16
5.5.220.0030.00913.75
5.5.210.0100.00613.84
5.5.200.0040.01214.15
5.5.190.0030.00614.13
5.5.180.0030.00513.67
5.5.170.0040.00713.98
5.5.160.0110.00413.97
5.5.150.0040.01013.92
5.5.140.0110.00313.57
5.5.130.0030.01014.02
5.5.120.0100.00313.82
5.5.110.0060.00613.57
5.5.100.0000.01713.73
5.5.90.0060.01013.93
5.5.80.0040.01214.16
5.5.70.0070.01113.73
5.5.60.0040.01214.00
5.5.50.0000.00913.56
5.5.40.0040.01113.92
5.5.30.0090.00614.12
5.5.20.0030.00814.01
5.5.10.0040.01114.19
5.5.00.0060.01013.91
5.4.450.0170.02515.47
5.4.440.0200.02515.35
5.4.430.0220.02715.46
5.4.420.0170.02215.46
5.4.410.0230.01515.28
5.4.400.0160.01815.21
5.4.390.0120.02215.19
5.4.380.0150.02515.19
5.4.370.0120.02115.19
5.4.360.0190.02015.19
5.4.350.0170.01315.26
5.4.340.0200.02515.19
5.4.330.0000.00811.39
5.4.320.0150.02515.25
5.4.310.0120.02215.35
5.4.300.0130.02015.25
5.4.290.0180.02115.27
5.4.280.0120.03015.25
5.4.270.0170.01815.25
5.4.260.0180.02015.30
5.4.250.0100.02415.35
5.4.240.0150.02715.30
5.4.230.0120.02215.25
5.4.220.0150.01715.25
5.4.210.0120.03415.25
5.4.200.0160.02015.25
5.4.190.0050.02415.25
5.4.180.0080.02015.29
5.4.170.0120.02615.25
5.4.160.0050.02715.25
5.4.150.0130.02815.27
5.4.140.0130.03315.25
5.4.130.0120.02715.25
5.4.120.0130.01915.25
5.4.110.0220.01515.25
5.4.100.0120.02015.25
5.4.90.0150.01315.25
5.4.80.0150.02215.25
5.4.70.0100.02515.25
5.4.60.0150.02015.25
5.4.50.0130.02315.25
5.4.40.0180.01615.25
5.4.30.0120.02515.25
5.4.20.0130.02415.25
5.4.10.0120.02615.25
5.4.00.0100.02215.25
5.3.290.0150.03015.25
5.3.280.0150.01615.25
5.3.270.0070.02815.25
5.3.260.0020.02115.25
5.3.250.0080.03315.25
5.3.240.0130.04915.25
5.3.230.0150.01915.25
5.3.220.0130.01715.25
5.3.210.0120.02015.25
5.3.200.0140.01715.25
5.3.190.0100.02215.25
5.3.180.0170.02215.25
5.3.170.0150.02315.25
5.3.160.0160.01715.25
5.3.150.0130.01615.25
5.3.140.0150.01815.25
5.3.130.0150.02315.25
5.3.120.0100.02615.25
5.3.110.0120.03315.25
5.3.100.0130.01715.25
5.3.90.0100.02315.25
5.3.80.0130.02215.25
5.3.70.0170.01515.25
5.3.60.0120.01715.25
5.3.50.0140.01915.25
5.3.40.0150.02215.25
5.3.30.0150.01915.25
5.3.20.0160.01715.25
5.3.10.0100.02815.25
5.3.00.0150.02115.25
5.2.170.0370.01719.11
5.2.160.0130.04019.11
5.2.150.0270.02719.11
5.2.140.0230.02319.11
5.2.130.0170.03319.11
5.2.120.0230.02319.11
5.2.110.0230.03019.11
5.2.100.0170.02319.11
5.2.90.0230.02719.11
5.2.80.0200.03319.11
5.2.70.0230.03319.11
5.2.60.0170.03719.11
5.2.50.0200.03019.11
5.2.40.0200.03019.11
5.2.30.0230.05719.11
5.2.20.0170.03319.11
5.2.10.0130.03319.11
5.2.00.0170.02719.11
5.1.60.0100.02719.11
5.1.50.0170.02319.11
5.1.40.0170.02319.11
5.1.30.0130.02719.11
5.1.20.0170.04719.11
5.1.10.0100.03319.11
5.1.00.0200.03019.11
5.0.50.0070.02019.11
5.0.40.0070.01719.11
5.0.30.0070.03319.11
5.0.20.0070.01319.11
5.0.10.0100.02019.11
5.0.00.0200.05719.11
4.4.90.0030.01319.11
4.4.80.0030.01719.11
4.4.70.0070.02019.11
4.4.60.0030.01319.11
4.4.50.0130.01319.11
4.4.40.0070.02319.11
4.4.30.0170.03019.11
4.4.20.0030.02019.11
4.4.10.0070.01719.11
4.4.00.0070.02719.11
4.3.110.0100.01319.11
4.3.100.0070.01019.11
4.3.90.0070.01019.11
4.3.80.0100.02019.11
4.3.70.0100.01319.11
4.3.60.0000.01719.11
4.3.50.0100.01019.11
4.3.40.0070.02019.11
4.3.30.0030.01319.11
4.3.20.0000.03019.11
4.3.10.0070.01319.11
4.3.00.0100.02019.11

preferences:
47.69 ms | 400 KiB | 5 Q