3v4l.org

run code in 300+ PHP versions simultaneously
<?php Interface ShapeInterface { public function getArea(); } Class ShapeManager { public function __construct(ShapeInterface $shape) { $this->shape = $shape; } public function getArea() { $this->shape->getArea(); } } Class Circle { public function getArea() { return 'circle area'; } } Class Sqaure { public function getArea() { return 'square area'; } } $shape = new ShapeManager(new Circle); $shape->getArea();

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.0060.01216.88
8.3.50.0090.00616.69
8.3.40.0070.01118.83
8.3.30.0140.00018.79
8.3.20.0040.00420.25
8.3.10.0080.00021.60
8.3.00.0070.00317.72
8.2.180.0130.00618.54
8.2.170.0100.01022.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00421.04
8.2.120.0080.00026.35
8.2.110.0090.00021.18
8.2.100.0060.00617.97
8.2.90.0050.00319.22
8.2.80.0030.00517.97
8.2.70.0080.00017.79
8.2.60.0060.00318.03
8.2.50.0060.00318.10
8.2.40.0000.00720.42
8.2.30.0080.00021.04
8.2.20.0000.00917.92
8.2.10.0000.00717.98
8.2.00.0000.00717.93
8.1.280.0040.01125.92
8.1.270.0000.00723.84
8.1.260.0040.00426.35
8.1.250.0090.00628.09
8.1.240.0060.00322.14
8.1.230.0070.00422.10
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00718.50
8.1.160.0060.00319.00
8.1.150.0040.00420.47
8.1.140.0000.00719.46
8.1.130.0070.00018.64
8.1.120.0080.00417.41
8.1.110.0000.00817.21
8.1.100.0040.00417.28
8.1.90.0000.00717.30
8.1.80.0000.00817.34
8.1.70.0030.00317.30
8.1.60.0040.00417.51
8.1.50.0030.00917.47
8.1.40.0040.00417.41
8.1.30.0050.00317.59
8.1.20.0030.00517.56
8.1.10.0030.00617.55
8.1.00.0060.00317.34
8.0.300.0100.00019.77
8.0.290.0050.00316.75
8.0.280.0070.00018.38
8.0.270.0000.00717.11
8.0.260.0000.00816.83
8.0.250.0030.00316.88
8.0.240.0000.00817.00
8.0.230.0080.00016.95
8.0.220.0000.00816.94
8.0.210.0000.00816.81
8.0.200.0030.00316.97
8.0.190.0000.00916.97
8.0.180.0030.00516.95
8.0.170.0000.00716.84
8.0.160.0040.00416.82
8.0.150.0030.00516.88
8.0.140.0040.00416.79
8.0.130.0000.00513.31
8.0.120.0040.00416.89
8.0.110.0040.00416.73
8.0.100.0040.00416.86
8.0.90.0040.00416.96
8.0.80.0070.01016.89
8.0.70.0040.00416.90
8.0.60.0000.00716.72
8.0.50.0070.00016.96
8.0.30.0110.00516.98
8.0.20.0070.01217.40
8.0.10.0070.00016.84
8.0.00.0100.00716.89
7.4.330.0000.00515.55
7.4.320.0030.00316.43
7.4.300.0060.00016.50
7.4.290.0000.01016.40
7.4.280.0000.00816.39
7.4.270.0000.00716.45
7.4.260.0000.00513.24
7.4.250.0000.00716.40
7.4.240.0050.00216.54
7.4.230.0050.00216.52
7.4.220.0100.01416.50
7.4.210.0060.00916.49
7.4.200.0000.00716.56
7.4.160.0090.00616.43
7.4.150.0080.00817.40
7.4.140.0030.01517.86
7.4.130.0140.01116.35
7.4.120.0120.00716.45
7.4.110.0030.01316.54
7.4.100.0130.00516.54
7.4.90.0090.00916.44
7.4.80.0030.01919.39
7.4.70.0100.01016.37
7.4.60.0090.00616.39
7.4.50.0060.00916.29
7.4.40.0130.00716.48
7.4.30.0030.01316.58
7.4.10.0070.00715.18
7.4.00.0050.00914.83
7.3.330.0000.00813.20
7.3.320.0000.00513.44
7.3.310.0070.00016.36
7.3.300.0030.00316.38
7.3.290.0080.00716.38
7.3.280.0080.00816.39
7.3.270.0160.00017.40
7.3.260.0120.00616.47
7.3.250.0130.00816.41
7.3.240.0110.00516.31
7.3.230.0040.01316.36
7.3.210.0060.01016.59
7.3.200.0060.01616.45
7.3.190.0040.01216.58
7.3.180.0060.00916.30
7.3.170.0100.00616.32
7.3.160.0000.01516.49
7.3.130.0070.00714.77
7.3.120.0140.00314.98
7.3.110.0030.01514.80
7.3.100.0000.01514.72
7.3.90.0100.00714.57
7.3.80.0100.00314.76
7.3.70.0060.00914.83
7.3.60.0040.00414.41
7.3.50.0060.00914.85
7.3.40.0050.00514.84
7.3.30.0050.00514.73
7.3.20.0080.00816.59
7.3.10.0070.00916.61
7.3.00.0050.00716.51
7.2.330.0070.01016.51
7.2.320.0170.00016.64
7.2.310.0060.01116.46
7.2.300.0140.00316.70
7.2.290.0120.00416.60
7.2.260.0040.01415.09
7.2.250.0180.00015.05
7.2.240.0060.00915.14
7.2.230.0030.01314.72
7.2.220.0120.00314.83
7.2.210.0060.00915.00
7.2.200.0090.00315.02
7.2.190.0030.01214.98
7.2.180.0000.01314.98
7.2.170.0060.00614.91
7.2.160.0040.01114.94
7.2.150.0030.00616.91
7.2.140.0030.01016.90
7.2.130.0020.01116.90
7.2.120.0030.01116.72
7.2.110.0050.01016.84
7.2.100.0050.00916.73
7.2.90.0060.00916.81
7.2.80.0050.00816.76
7.2.70.0020.01316.84
7.2.60.0100.00516.72
7.2.50.0060.00816.74
7.2.40.0040.01116.92
7.2.30.0050.01216.90
7.2.20.0050.00716.71
7.2.10.0050.00716.61
7.2.00.0050.01117.58
7.1.330.0130.00315.43
7.1.320.0030.00915.72
7.1.310.0030.00915.53
7.1.300.0030.01015.48
7.1.290.0060.00615.58
7.1.280.0040.00715.41
7.1.270.0080.00015.63
7.1.260.0050.00515.65
7.1.250.0060.00715.52
7.1.240.0030.00915.79
7.1.230.0060.00615.67
7.1.220.0060.00915.70
7.1.210.0070.00715.39
7.1.200.0080.00515.73
7.1.190.0080.00515.48
7.1.180.0000.01215.83
7.1.170.0060.00615.73
7.1.160.0060.00615.61
7.1.150.0070.00715.74
7.1.140.0030.01015.62
7.1.130.0080.00315.74
7.1.120.0070.01015.79
7.1.110.0080.00715.78
7.1.100.0050.00916.71
7.1.90.0040.01115.70
7.1.80.0030.01415.79
7.1.70.0070.00716.41
7.1.60.0150.01425.45
7.1.50.0160.01125.15
7.1.40.0090.01424.92
7.1.30.0150.00724.96
7.1.20.0130.00925.21
7.1.10.0050.01016.11
7.1.00.0100.00516.06
7.0.330.0030.00915.22
7.0.320.0090.00315.13
7.0.310.0080.00015.32
7.0.300.0090.00315.34
7.0.290.0030.00715.07
7.0.280.0100.00315.22
7.0.270.0000.01415.09
7.0.260.0110.00015.29
7.0.250.0000.00915.34
7.0.240.0070.00715.46
7.0.230.0000.01215.10
7.0.220.0030.00615.45
7.0.210.0070.00714.92
7.0.200.0090.00715.95
7.0.190.0040.01315.95
7.0.180.0090.00515.64
7.0.170.0030.00815.87
7.0.160.0050.00915.63
7.0.150.0030.00915.76
7.0.140.0050.00915.79
7.0.130.0060.00915.95
7.0.120.0030.00815.95
7.0.110.0030.01015.87
7.0.100.0090.00615.83
7.0.90.0050.00615.80
7.0.80.0070.00615.65
7.0.70.0030.00915.71
7.0.60.0080.00515.52
7.0.50.0100.00315.92
7.0.40.0030.01015.01
7.0.30.0080.00414.80
7.0.20.0040.01114.84
7.0.10.0030.00914.91
7.0.00.0070.00914.89
5.6.400.0000.01114.23
5.6.390.0070.00714.06
5.6.380.0030.00614.20
5.6.370.0060.00914.11
5.6.360.0070.01014.34
5.6.350.0100.00314.17
5.6.340.0030.01013.93
5.6.330.0040.01514.27
5.6.320.0040.00814.36
5.6.310.0000.01614.62
5.6.300.0000.01814.50
5.6.290.0120.00614.04
5.6.280.0090.00614.50
5.6.270.0040.00713.97
5.6.260.0060.00914.37
5.6.250.0060.00914.21
5.6.240.0110.00314.10
5.6.230.0030.01214.59
5.6.220.0090.00314.48
5.6.210.0030.00614.23
5.6.200.0040.01114.26
5.6.190.0120.00314.34
5.6.180.0060.00614.02
5.6.170.0030.00914.13
5.6.160.0060.00914.18
5.6.150.0000.01313.90
5.6.140.0000.00914.34
5.6.130.0060.00914.50
5.6.120.0040.01414.20
5.6.110.0060.01314.14
5.6.100.0060.01214.22
5.6.90.0030.01014.49
5.6.80.0120.00314.29
5.6.70.0000.00813.98
5.6.60.0040.00814.18
5.6.50.0080.00814.15
5.6.40.0100.00714.05
5.6.30.0030.01014.39
5.6.20.0120.00313.97
5.6.10.0000.00914.30
5.6.00.0040.00414.25

preferences:
102.85 ms | 400 KiB | 5 Q