3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mammal { function mate(Mammal $with) { $class = substr($this.get_class(), 0, -1) . substr($with.get_class(), 1); eval("class $class extends Mammal {}"); return new $class; } } class Cheval extends Mammal {} class Poney extends Mammal {} $mingmong = new Cheval; $charles = new Poney; $charlimong = $mingmong->mate($charles); var_dump($charlimong);

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.0110.01116.88
8.3.50.0070.01420.05
8.3.40.0040.01418.84
8.3.30.0100.00319.04
8.3.20.0000.00820.21
8.3.10.0050.00320.58
8.3.00.0060.00319.26
8.2.180.0000.01516.63
8.2.170.0070.00722.96
8.2.160.0040.01120.21
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0090.00020.91
8.2.110.0040.00420.35
8.2.100.0110.00017.97
8.2.90.0080.00019.03
8.2.80.0040.00417.97
8.2.70.0000.00917.50
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0110.00018.03
8.2.30.0000.00719.32
8.2.20.0050.00217.61
8.2.10.0040.00418.04
8.2.00.0080.00017.66
8.1.280.0110.00725.92
8.1.270.0050.00323.96
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00022.05
8.1.230.0040.00718.97
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0090.00317.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00318.52
8.1.160.0040.00422.11
8.1.150.0000.00718.90
8.1.140.0000.00817.33
8.1.130.0000.00717.70
8.1.120.0000.00717.41
8.1.110.0000.00817.32
8.1.100.0000.00717.35
8.1.90.0040.00417.35
8.1.80.0040.00417.36
8.1.70.0000.00717.46
8.1.60.0030.00617.61
8.1.50.0000.00817.41
8.1.40.0050.00217.41
8.1.30.0040.00417.65
8.1.20.0000.00717.70
8.1.10.0000.00717.48
8.1.00.0050.00317.43
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0060.00318.34
8.0.270.0000.00717.18
8.0.260.0030.00318.49
8.0.250.0030.00316.91
8.0.240.0040.00417.02
8.0.230.0000.00717.05
8.0.220.0000.00816.98
8.0.210.0040.00416.95
8.0.200.0060.00016.93
8.0.190.0040.00417.03
8.0.180.0050.00316.87
8.0.170.0040.00416.89
8.0.160.0000.00816.85
8.0.150.0030.00316.83
8.0.140.0070.00016.95
8.0.130.0030.00313.36
8.0.120.0000.00816.94
8.0.110.0070.00017.02
8.0.100.0000.00716.80
8.0.90.0080.00016.80
8.0.80.0160.00716.92
8.0.70.0000.00716.91
8.0.60.0070.00016.86
8.0.50.0000.00817.01
8.0.30.0110.00817.13
8.0.20.0040.01617.40
8.0.10.0040.00417.05
8.0.00.0100.01016.72
7.4.330.0000.00515.20
7.4.320.0030.00316.55
7.4.300.0030.00316.52
7.4.290.0030.00316.41
7.4.280.0030.00616.40
7.4.270.0000.00716.54
7.4.260.0000.00716.50
7.4.250.0030.00316.52
7.4.240.0040.00316.48
7.4.230.0080.00016.67
7.4.220.0140.00316.67
7.4.210.0060.00816.61
7.4.200.0030.00316.50
7.4.160.0080.01516.54
7.4.150.0060.01317.40
7.4.140.0100.00717.86
7.4.130.0130.00416.50
7.4.120.0120.00516.52
7.4.110.0080.00816.51
7.4.100.0120.00616.56
7.4.90.0090.00816.74
7.4.80.0170.00719.39
7.4.70.0130.01016.59
7.4.60.0120.00316.47
7.4.50.0040.00416.57
7.4.40.0100.00716.46
7.4.30.0070.01316.38
7.4.00.0070.01015.02
7.3.330.0000.00513.21
7.3.320.0020.00513.40
7.3.310.0000.00716.31
7.3.300.0030.00316.23
7.3.290.0000.01416.33
7.3.280.0050.01216.37
7.3.270.0190.00517.40
7.3.260.0090.00916.30
7.3.250.0140.00516.35
7.3.240.0060.01216.25
7.3.230.0120.00516.39
7.3.210.0090.00916.32
7.3.200.0120.01219.39
7.3.190.0100.01116.32
7.3.180.0000.01716.42
7.3.170.0110.01116.40
7.3.160.0070.01716.41
7.2.330.0160.00816.34
7.2.320.0060.01016.77
7.2.310.0130.00316.25
7.2.300.0090.00916.31
7.2.290.0120.00416.72
7.2.60.0070.00716.79
7.2.00.0110.00619.38
7.1.200.0100.00315.79
7.1.100.0070.00717.94
7.1.70.0000.01216.96
7.1.60.0070.01719.61
7.1.50.0030.02016.74
7.1.00.0000.08022.30
7.0.200.0030.00616.75
7.0.140.0030.06321.96
7.0.60.0030.04319.86
7.0.50.0070.08317.84
7.0.40.0030.04720.11
7.0.30.0100.05320.13
7.0.20.0370.06320.20
7.0.10.0330.07320.09
7.0.00.0000.04320.09
5.6.210.0000.08020.76
5.6.200.0100.04018.23
5.6.190.0130.08020.64
5.6.180.0300.04720.46
5.6.170.0230.08320.71
5.6.160.0100.04720.52
5.6.150.0000.04018.23
5.6.140.0100.05318.15
5.6.130.0030.08718.11
5.6.120.0030.05021.05
5.6.110.0070.08321.01
5.6.100.0100.06321.02
5.6.90.0100.08321.13
5.6.80.0170.07320.51
5.6.70.0370.07020.40
5.5.350.0230.07720.49
5.5.340.0030.08317.95
5.5.330.0100.06320.31
5.5.320.0300.07720.34
5.5.310.0200.06720.35
5.5.300.0070.07718.03
5.5.290.0070.05018.03
5.5.280.0130.07720.90
5.5.270.0100.03320.96
5.5.260.0130.07720.86
5.5.250.0070.08020.77
5.5.240.0030.08320.19
5.4.450.0300.03719.39
5.4.440.0370.04719.47
5.4.430.0200.04719.56
5.4.420.0370.04019.40
5.4.410.0030.04319.41
5.4.400.0200.03319.14
5.4.390.0370.04319.27
5.4.380.0170.05718.46
5.4.370.0270.05718.62
5.4.360.0170.05718.56
5.4.350.0170.07318.80
5.4.340.0170.05318.80
5.4.320.0090.03912.51
5.4.310.0070.04412.50
5.4.300.0090.04212.51
5.4.290.0030.04112.49
5.4.280.0060.03412.39
5.4.270.0090.03512.39
5.4.260.0040.04012.39
5.4.250.0090.03612.39
5.4.240.0060.03512.40
5.4.230.0050.03812.39
5.4.220.0050.03712.39
5.4.210.0090.04812.39
5.4.200.0100.04112.39
5.4.190.0140.03812.38
5.4.180.0080.03612.38
5.4.170.0080.03412.39
5.4.160.0060.03612.39
5.4.150.0090.03312.39
5.4.140.0060.04212.07
5.4.130.0060.04112.06
5.4.120.0060.03712.02
5.4.110.0030.03912.02
5.4.100.0060.04412.01
5.4.90.0080.04712.02
5.4.80.0100.03712.02
5.4.70.0110.05012.01
5.4.60.0080.04512.01
5.4.50.0090.03612.01
5.4.40.0080.03512.00
5.4.30.0110.04411.99
5.4.20.0110.03311.99
5.4.10.0080.03512.00
5.4.00.0050.04011.49
5.3.290.0110.04112.80
5.3.280.0120.04512.71
5.3.270.0110.03812.73
5.3.260.0070.04112.72
5.3.250.0080.03612.72
5.3.240.0040.04012.72
5.3.230.0070.03912.71
5.3.220.0060.03812.68
5.3.210.0070.04012.68
5.3.200.0080.03712.68
5.3.190.0090.04812.67
5.3.180.0130.04712.67
5.3.170.0120.04112.67
5.3.160.0130.04512.67
5.3.150.0070.05212.67
5.3.140.0050.04212.66
5.3.130.0070.03812.66
5.3.120.0060.04412.66
5.3.110.0090.04412.66
5.3.100.0070.04312.12
5.3.90.0090.04212.11
5.3.80.0050.04312.09
5.3.70.0100.04812.10
5.3.60.0110.04912.08
5.3.50.0060.03912.03
5.3.40.0100.04012.03
5.3.30.0060.04311.98
5.3.20.0080.04911.77
5.3.10.0080.03611.73
5.3.00.0090.04111.72
5.2.170.0070.0389.23
5.2.160.0110.0389.22
5.2.150.0120.0369.23
5.2.140.0070.0399.22
5.2.130.0040.0329.18
5.2.120.0080.0269.18
5.2.110.0060.0299.18
5.2.100.0050.0299.18
5.2.90.0070.0279.18
5.2.80.0040.0329.18
5.2.70.0050.0319.17
5.2.60.0050.0379.13
5.2.50.0070.0389.10
5.2.40.0110.0389.08
5.2.30.0050.0329.05
5.2.20.0040.0319.04
5.2.10.0090.0378.95
5.2.00.0040.0418.81
5.1.60.0080.0288.10
5.1.50.0050.0328.10
5.1.40.0050.0348.09
5.1.30.0090.0348.43
5.1.20.0080.0388.45
5.1.10.0060.0328.18
5.1.00.0070.0268.18
5.0.50.0040.0216.66
5.0.40.0040.0296.52
5.0.30.0070.0346.32
5.0.20.0040.0226.30
5.0.10.0030.0206.27
5.0.00.0030.0316.26
4.4.90.0010.0184.78
4.4.80.0050.0134.76
4.4.70.0050.0144.76
4.4.60.0050.0164.76
4.4.50.0040.0194.77
4.4.40.0040.0314.71
4.4.30.0050.0144.76
4.4.20.0060.0134.84
4.4.10.0020.0164.85
4.4.00.0000.0294.76
4.3.110.0020.0164.67
4.3.100.0020.0164.66
4.3.90.0030.0144.63
4.3.80.0020.0244.58
4.3.70.0030.0144.63
4.3.60.0030.0144.63
4.3.50.0060.0124.63
4.3.40.0020.0244.54
4.3.30.0020.0193.30
4.3.20.0030.0193.28
4.3.10.0010.0163.24
4.3.00.0030.01718.16

preferences:
50.7 ms | 400 KiB | 5 Q