3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IService { public function interfaceFunction(); } final class ServiceWithOtherFunction implements IService { public function interfaceFunction() { echo "ServiceWithOtherFunction interfaceFunction\n"; } public function otherFunction() { echo "ServiceWithOtherFunction otherFunction\n"; } } final class Controller { private $service; public function __construct(IService $service) { $this->service = $service; } public function indexAction() { $this->service->interfaceFunction(); $this->service->otherFunction(); } } $controllerWithOtherFunction = new Controller(new ServiceWithOtherFunction); $controllerWithOtherFunction->indexAction(); final class ServiceWithoutOtherFunction implements IService { public function interfaceFunction() { echo "ServiceWithoutOtherFunction interfaceFunction\n"; } } $controllerWithoutOtherFunction = new Controller(new ServiceWithoutOtherFunction); $controllerWithoutOtherFunction->indexAction();

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.0180.00018.62
8.3.50.0120.00316.73
8.3.40.0080.00818.84
8.3.30.0040.01118.82
8.3.20.0040.00419.27
8.3.10.0050.00221.84
8.3.00.0060.00920.90
8.2.180.0180.00318.29
8.2.170.0090.00622.96
8.2.160.0060.00918.84
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0100.00017.93
8.2.110.0090.00920.37
8.2.100.0090.00317.91
8.2.90.0050.00319.04
8.2.80.0000.00719.39
8.2.70.0080.00417.90
8.2.60.0000.00718.16
8.2.50.0040.00418.10
8.2.40.0070.00020.42
8.2.30.0070.00019.27
8.2.20.0050.00217.98
8.2.10.0060.00318.13
8.2.00.0040.00417.75
8.1.270.0030.00620.68
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0050.00522.46
8.1.230.0080.00420.91
8.1.220.0040.00418.77
8.1.210.0040.00419.04
8.1.200.0070.00317.35
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0000.00818.49
8.1.160.0030.00518.91
8.1.150.0040.00420.18
8.1.140.0070.00019.47
8.1.130.0000.00717.48
8.1.120.0040.00417.55
8.1.110.0110.00017.43
8.1.100.0040.00417.39
8.1.90.0000.00817.46
8.1.80.0000.00717.50
8.1.70.0000.00717.43
8.1.60.0050.00217.54
8.1.50.0030.00517.51
8.1.40.0000.00917.49
8.1.30.0050.00317.62
8.1.20.0000.00717.68
8.1.10.0060.00317.55
8.1.00.0050.00317.46
8.0.300.0060.00319.85
8.0.290.0000.00717.18
8.0.280.0000.00718.49
8.0.270.0030.00316.84
8.0.260.0000.00716.92
8.0.250.0030.00317.03
8.0.240.0040.00417.05
8.0.230.0030.00317.05
8.0.220.0040.00416.86
8.0.210.0040.00416.94
8.0.200.0030.00517.05
8.0.190.0080.00016.94
8.0.180.0000.00816.96
8.0.170.0040.00416.97
8.0.160.0000.00716.98
8.0.150.0040.00416.87
8.0.140.0030.00316.86
8.0.130.0060.00013.42
8.0.120.0000.00816.98
8.0.110.0070.00017.08
8.0.100.0070.00016.84
8.0.90.0000.00716.93
8.0.80.0100.01016.95
8.0.70.0000.00716.80
8.0.60.0040.00416.88
8.0.50.0000.00816.86
8.0.30.0120.00717.20
8.0.20.0130.00817.41
8.0.10.0050.00217.11
8.0.00.0030.01316.75
7.4.330.0050.00015.55
7.4.320.0040.00416.55
7.4.300.0030.00316.54
7.4.290.0040.00316.63
7.4.280.0030.00316.61
7.4.270.0000.00816.62
7.4.260.0070.00016.50
7.4.250.0030.00316.50
7.4.240.0000.00716.54
7.4.230.0030.00316.69
7.4.220.0100.01616.52
7.4.210.0100.01016.56
7.4.200.0050.00316.68
7.4.160.0130.00316.64
7.4.150.0060.01317.40
7.4.140.0140.00517.86
7.4.130.0110.00816.57
7.4.120.0060.01116.54
7.4.110.0070.01416.51
7.4.100.0040.01316.37
7.4.90.0150.00316.64
7.4.80.0030.01319.39
7.4.70.0000.01716.64
7.4.60.0130.00316.53
7.4.50.0100.00716.47
7.4.40.0150.00616.36
7.4.30.0090.01316.82
7.4.00.0060.00815.11
7.3.330.0030.00513.42
7.3.320.0000.00513.33
7.3.310.0000.00716.40
7.3.300.0000.00716.34
7.3.290.0110.00416.36
7.3.280.0080.01016.34
7.3.270.0040.01417.40
7.3.260.0090.01416.54
7.3.250.0140.00716.39
7.3.240.0100.00916.48
7.3.230.0070.01316.39
7.3.210.0090.00616.30
7.3.200.0100.01016.44
7.3.190.0140.00316.42
7.3.180.0090.00616.37
7.3.170.0090.01516.47
7.3.160.0060.01116.40
7.2.330.0070.01116.41
7.2.320.0160.00316.73
7.2.310.0140.00316.34
7.2.300.0120.00916.82
7.2.290.0180.00416.71
7.2.60.0100.00317.00
7.1.200.0070.01015.48
7.1.70.0080.00416.95
7.1.60.0070.00917.14
7.1.50.0100.00316.98
7.1.40.0030.01216.59
7.1.30.0020.01216.64
7.1.20.0070.00716.57
7.1.10.0050.00716.51
7.1.00.0000.00916.61
7.0.200.0000.01116.88
7.0.190.0040.00416.64
7.0.180.0070.00416.25
7.0.170.0000.01216.48
7.0.160.0000.01116.16
7.0.150.0060.00616.40
7.0.140.0050.00516.26
7.0.130.0030.00516.67
7.0.120.0000.00716.64
7.0.110.0000.00816.31
7.0.100.0080.00016.63
7.0.90.0190.00616.57
7.0.80.0180.00716.44
7.0.70.0170.00316.35
7.0.60.0220.00316.11
7.0.50.0220.00016.45
7.0.40.0040.00714.59
7.0.30.0050.00314.59
7.0.20.0000.00714.59
7.0.10.0030.00614.59
7.0.00.0000.01014.59
5.6.300.0140.04520.66
5.6.290.0070.04020.88
5.6.280.0030.04520.84
5.6.270.0330.03320.99
5.6.260.0030.04520.98
5.6.250.0070.04120.96
5.6.240.0060.04420.84
5.6.230.0070.04120.88
5.6.220.0140.03820.91
5.6.210.0100.05120.62
5.6.200.0060.04521.05
5.6.190.0030.04720.95
5.6.180.0030.04720.79
5.6.170.0030.04620.84
5.6.160.0170.04020.90
5.6.150.0130.04021.06
5.6.140.0100.04420.85
5.6.130.0150.04320.88
5.6.120.0040.04720.79
5.6.110.0090.04721.01
5.6.100.0100.04420.82
5.6.90.0100.04320.93
5.6.80.0100.03720.26
5.6.70.0030.04420.13
5.6.60.0030.04620.34
5.6.50.0100.04120.20
5.6.40.0070.03920.37
5.6.30.0000.04820.23
5.6.20.0100.04820.23
5.6.10.0040.04620.35
5.6.00.0100.04220.27

preferences:
67.58 ms | 400 KiB | 5 Q