3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shirt { public function test() { return "Shirt"; } } class Sweater extends Shirt { public function test() { return "Sweater"; } public function doSweaterStuff() { echo "This is a sweater!"; } } $shirt = new Shirt(); output_shirt($shirt); function output_shirt(Sweater $sweater) { $sweater->doSweaterStuff(); echo $sweater->test(); }

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.70.0110.00416.58
8.3.60.0180.00416.75
8.3.50.0100.00822.11
8.3.40.0090.00618.71
8.3.30.0110.00418.89
8.3.20.0040.00420.29
8.3.10.0040.00421.91
8.3.00.0080.00819.37
8.2.180.0110.00418.54
8.2.170.0100.01022.96
8.2.160.0100.00720.36
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0060.00317.63
8.2.120.0040.00426.35
8.2.110.0090.00021.00
8.2.100.0070.00817.63
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0030.00517.80
8.2.50.0080.00018.07
8.2.40.0000.00719.34
8.2.30.0040.00420.68
8.2.20.0030.00517.66
8.2.10.0040.00417.98
8.2.00.0000.00717.85
8.1.280.0110.00325.92
8.1.270.0030.00623.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0060.00617.53
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0040.00418.52
8.1.160.0080.00021.94
8.1.150.0000.00718.82
8.1.140.0040.00419.52
8.1.130.0000.00817.63
8.1.120.0000.00717.33
8.1.110.0040.00417.39
8.1.100.0040.00417.31
8.1.90.0040.00417.34
8.1.80.0000.00717.39
8.1.70.0040.00417.41
8.1.60.0030.00617.63
8.1.50.0030.00617.48
8.1.40.0000.00917.50
8.1.30.0040.00417.55
8.1.20.0000.00717.54
8.1.10.0040.00417.59
8.1.00.0110.00017.48
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.44
8.0.270.0040.00417.13
8.0.260.0040.00417.25
8.0.250.0070.00016.95
8.0.240.0040.00416.93
8.0.230.0000.00716.94
8.0.220.0060.00316.73
8.0.210.0000.00816.80
8.0.200.0060.00016.95
8.0.190.0040.00416.96
8.0.180.0050.00316.80
8.0.170.0050.00216.89
8.0.160.0030.00316.92
8.0.150.0080.00016.79
8.0.140.0000.00716.84
8.0.130.0040.00413.27
8.0.120.0000.00916.75
8.0.110.0040.00416.89
8.0.100.0040.00416.94
8.0.90.0000.00716.69
8.0.80.0090.00616.84
8.0.70.0000.00716.75
8.0.60.0070.00016.93
8.0.50.0000.00716.90
8.0.30.0060.01216.89
8.0.20.0110.00717.40
8.0.10.0070.00017.06
8.0.00.0100.01016.78
7.4.330.0030.00316.78
7.4.320.0070.00016.52
7.4.300.0070.00016.50
7.4.290.0030.00316.61
7.4.280.0000.00716.46
7.4.270.0000.00616.59
7.4.260.0030.00616.58
7.4.250.0000.00816.38
7.4.240.0030.00316.48
7.4.230.0070.00016.68
7.4.220.0070.01116.48
7.4.210.0090.00616.51
7.4.200.0030.00316.48
7.4.160.0100.00616.62
7.4.150.0120.00617.40
7.4.140.0130.01117.86
7.4.130.0130.00816.60
7.4.120.0080.01016.51
7.4.110.0100.01316.39
7.4.100.0120.00816.48
7.4.90.0030.01416.57
7.4.80.0140.00419.39
7.4.70.0100.01016.55
7.4.60.0100.00616.51
7.4.50.0070.00716.33
7.4.40.0060.01016.61
7.4.30.0090.01316.54
7.4.00.0070.01014.91
7.3.330.0030.00313.30
7.3.320.0030.00313.25
7.3.310.0000.00716.31
7.3.300.0030.00316.30
7.3.290.0030.01216.24
7.3.280.0120.00416.33
7.3.270.0080.00817.40
7.3.260.0090.00916.51
7.3.250.0140.00616.24
7.3.240.0060.01116.38
7.3.230.0060.01216.43
7.3.210.0170.00716.49
7.3.200.0110.00816.22
7.3.190.0110.01116.39
7.3.180.0100.00716.26
7.3.170.0110.00516.32
7.3.160.0060.01016.21
7.2.330.0100.00616.57
7.2.320.0110.00616.33
7.2.310.0070.01016.60
7.2.300.0080.00816.58
7.2.290.0140.00616.34
7.2.60.0080.00816.71
7.2.00.0030.01019.19
7.1.200.0030.00315.54
7.1.100.0000.01318.06
7.1.70.0070.00016.89
7.1.60.0060.01919.36
7.1.50.0090.00316.93
7.1.00.0030.07722.36
7.0.200.0100.00016.78
7.0.60.0100.08019.84
7.0.50.0100.07317.87
7.0.40.0100.08320.09
7.0.30.0230.04320.31
7.0.20.0270.08020.23
7.0.10.0130.06720.12
7.0.00.0070.09020.25
5.6.280.0130.04720.89
5.6.210.0100.03320.70
5.6.200.0000.09018.23
5.6.190.0030.04720.64
5.6.180.0530.06320.64
5.6.170.0270.08020.48
5.6.160.0030.04020.54
5.6.150.0100.03318.25
5.6.140.0100.05318.21
5.6.130.0070.07318.22
5.6.120.0070.04020.91
5.6.110.0170.08020.98
5.6.100.0100.04021.11
5.6.90.0000.04320.96
5.6.80.0070.07320.38
5.5.350.0170.07720.31
5.5.340.0130.06317.93
5.5.330.0170.07020.21
5.5.320.0000.06020.36
5.5.310.0230.06320.30
5.5.300.0030.05017.98
5.5.290.0100.03317.97
5.5.280.0130.03720.74
5.5.270.0170.07320.98
5.5.260.0000.05020.80
5.5.250.0070.08320.71
5.5.240.0130.07720.27

preferences:
56.04 ms | 401 KiB | 5 Q