3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CommandHandler { public function handle($cmd) { //... $this->eventBus->dispatch($events); } } interface EventBus { public function registerListener(Listener $listener); public function dispatch($events); // foreach $event traverse listeners calling when($event) } abstract class Listener { public function __construct(EventBus $bus) { $bus->registerListener($this); } public function when($event) { // call $this->onEvent() if it exsits } } class SomeListener { public function onSomeEvent($event) { // do something } }

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.31
8.3.50.0090.00617.76
8.3.40.0120.00918.54
8.3.30.0110.00318.72
8.3.20.0000.00819.00
8.3.10.0000.00721.65
8.3.00.0050.00319.56
8.2.180.0110.01116.38
8.2.170.0060.00922.96
8.2.160.0110.00420.31
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.70
8.2.120.0040.00426.35
8.2.110.0030.00721.07
8.2.100.0060.00617.72
8.2.90.0040.00818.81
8.2.80.0040.00419.36
8.2.70.0040.00417.80
8.2.60.0050.00317.90
8.2.50.0040.00418.10
8.2.40.0000.00820.68
8.2.30.0030.00621.17
8.2.20.0070.00018.00
8.2.10.0000.00717.97
8.2.00.0040.00419.14
8.1.270.0080.00023.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00719.03
8.1.230.0080.00417.75
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0110.00616.88
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0030.00518.72
8.1.150.0000.00818.81
8.1.140.0050.00217.64
8.1.130.0030.00319.01
8.1.120.0040.00417.31
8.1.110.0050.00217.32
8.1.100.0040.00417.28
8.1.90.0000.00717.41
8.1.80.0070.00017.39
8.1.70.0000.00917.26
8.1.60.0000.00817.51
8.1.50.0040.00417.41
8.1.40.0080.00017.34
8.1.30.0090.00017.58
8.1.20.0000.00717.47
8.1.10.0050.00317.33
8.1.00.0000.00817.33
8.0.300.0070.00018.77
8.0.290.0000.00816.58
8.0.280.0040.00418.23
8.0.270.0030.00317.14
8.0.260.0030.00317.13
8.0.250.0060.00016.84
8.0.240.0070.00016.79
8.0.230.0030.00316.66
8.0.220.0030.00316.78
8.0.210.0000.00716.67
8.0.200.0030.00316.83
8.0.190.0030.00616.85
8.0.180.0000.00716.81
8.0.170.0070.00316.78
8.0.160.0030.00316.83
8.0.150.0050.00316.67
8.0.140.0040.00416.74
8.0.130.0000.00513.20
8.0.120.0040.00416.80
8.0.110.0040.00416.72
8.0.100.0040.00416.65
8.0.90.0040.00416.72
8.0.80.0040.01216.77
8.0.70.0040.00416.83
8.0.60.0030.00616.82
8.0.50.0040.00416.75
8.0.30.0140.00416.84
8.0.20.0120.00717.40
8.0.10.0040.00416.77
8.0.00.0100.00716.65
7.4.330.0000.00515.55
7.4.320.0040.00416.38
7.4.300.0000.00816.38
7.4.290.0080.00016.48
7.4.280.0000.00816.46
7.4.270.0060.00016.51
7.4.260.0000.00716.50
7.4.250.0040.00416.34
7.4.240.0000.00816.51
7.4.230.0000.00716.22
7.4.220.0040.00416.50
7.4.210.0050.00816.42
7.4.200.0000.00716.40
7.4.160.0080.00916.36
7.4.140.0150.00417.86
7.4.130.0070.01116.23
7.4.120.0090.00916.39
7.4.110.0070.01016.34
7.4.100.0070.01016.38
7.4.90.0170.00016.32
7.4.80.0150.00319.39
7.4.70.0030.01716.30
7.4.60.0130.00916.38
7.4.50.0090.00616.16
7.4.40.0070.01016.25
7.4.00.0070.01114.91
7.3.330.0020.00213.25
7.3.320.0000.00613.25
7.3.310.0040.00416.20
7.3.300.0000.00616.18
7.3.290.0070.00016.04
7.3.280.0140.00916.18
7.3.260.0110.00716.23
7.3.240.0130.00416.37
7.3.230.0030.01316.36
7.3.210.0130.00316.21
7.3.200.0060.00916.39
7.3.190.0120.00616.08
7.3.180.0060.01016.16
7.3.170.0060.01016.30
7.3.160.0130.00616.07
7.2.330.0120.00616.25
7.2.320.0070.01016.34
7.2.310.0120.00916.20
7.2.300.0090.01316.45
7.2.290.0120.00616.24
7.2.60.0000.01516.80
7.2.40.5450.01117.23
7.2.30.4790.00817.24
7.2.20.4670.01217.29
7.2.10.4850.00817.35
7.2.00.3510.00817.64
7.1.200.0060.00615.57
7.1.160.5730.00916.45
7.1.150.4880.00816.08
7.1.140.5550.01016.64
7.1.130.5680.01016.51
7.1.120.4390.00416.34
7.1.110.3830.00615.76
7.1.100.2960.00515.38
7.1.90.8660.00615.64
7.1.80.6850.00515.31
7.1.70.7390.00815.14
7.1.60.4320.01033.00
7.1.50.5420.01432.66
7.1.40.6570.01332.35
7.1.30.8770.01032.60
7.1.21.0240.01432.54
7.1.10.8590.01114.71
7.1.00.4580.00814.87

preferences:
58.68 ms | 400 KiB | 5 Q