3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Mammal { function mate(Mammal $with) { $class = substr(get_class($this), 1, -1) . substr(get_class($with), 1); eval("class $class extends Mammal {}"); return new $class; } } class Panda extends Mammal {} class Dolphin extends Mammal {} $mingmong = new Panda; $charles = new Dolphin; $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.70.0070.01416.61
8.3.60.0070.00716.63
8.3.50.0140.00822.93
8.3.40.0030.01418.62
8.3.30.0140.00019.25
8.3.20.0080.00020.00
8.3.10.0000.00920.57
8.3.00.0040.00419.25
8.2.180.0100.00716.38
8.2.170.0120.00322.96
8.2.160.0060.01220.34
8.2.150.0040.01124.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0100.00020.81
8.2.110.0100.00020.98
8.2.100.0070.00417.84
8.2.90.0030.00517.90
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0030.00718.22
8.2.30.0030.00319.50
8.2.20.0050.00317.73
8.2.10.0040.00418.05
8.2.00.0000.00817.59
8.1.280.0150.00625.92
8.1.270.0080.00022.22
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00622.44
8.1.230.0070.00420.97
8.1.220.0030.00617.74
8.1.210.0080.00018.89
8.1.200.0000.01117.22
8.1.190.0050.00317.22
8.1.180.0040.00418.10
8.1.170.0060.00318.46
8.1.160.0000.00722.02
8.1.150.0040.00418.89
8.1.140.0000.00717.45
8.1.130.0000.00717.75
8.1.120.0030.00517.35
8.1.110.0030.00517.36
8.1.100.0000.00717.53
8.1.90.0070.00017.53
8.1.80.0030.00517.48
8.1.70.0000.00617.34
8.1.60.0000.01117.48
8.1.50.0040.00417.55
8.1.40.0050.00317.49
8.1.30.0040.00417.63
8.1.20.0040.00417.58
8.1.10.0000.00717.59
8.1.00.0080.00017.35
8.0.300.0040.00419.98
8.0.290.0040.00416.61
8.0.280.0030.00618.45
8.0.270.0050.00317.32
8.0.260.0030.00317.16
8.0.250.0030.00317.02
8.0.240.0080.00016.93
8.0.230.0000.00716.90
8.0.220.0000.00717.00
8.0.210.0060.00316.98
8.0.200.0030.00317.02
8.0.190.0060.00316.91
8.0.180.0000.00717.00
8.0.170.0000.00817.00
8.0.160.0020.00516.80
8.0.150.0000.00716.92
8.0.140.0040.00416.78
8.0.130.0000.00513.32
8.0.120.0000.00816.92
8.0.110.0000.00816.92
8.0.100.0070.00016.79
8.0.90.0070.00016.97
8.0.80.0180.00316.98
8.0.70.0000.00717.04
8.0.60.0000.00716.75
8.0.50.0000.00816.94
8.0.30.0130.00616.98
8.0.20.0110.01017.41
8.0.10.0050.00216.94
8.0.00.0100.00716.89
7.4.330.0000.00515.15
7.4.320.0000.00616.46
7.4.300.0040.00416.57
7.4.290.0000.00816.51
7.4.280.0000.00716.59
7.4.270.0070.00016.52
7.4.260.0030.00316.48
7.4.250.0000.00716.49
7.4.240.0000.00816.58
7.4.230.0070.00016.48
7.4.220.0100.01616.61
7.4.210.0090.00916.61
7.4.200.0030.00316.40
7.4.160.0070.01116.47
7.4.150.0100.01417.40
7.4.140.0110.00617.86
7.4.130.0020.01416.51
7.4.120.0060.01316.56
7.4.110.0130.00616.54
7.4.100.0080.01116.55
7.4.90.0030.01216.48
7.4.80.0100.00719.39
7.4.70.0060.01016.48
7.4.60.0030.01316.50
7.4.50.0040.00416.54
7.4.40.0090.00916.60
7.4.30.0120.00616.59
7.4.00.0070.01014.95
7.3.330.0050.00013.41
7.3.320.0000.00613.38
7.3.310.0000.00716.48
7.3.300.0030.00316.25
7.3.290.0060.00916.35
7.3.280.0110.00416.36
7.3.270.0100.01017.40
7.3.260.0060.01016.34
7.3.250.0050.01216.46
7.3.240.0100.00916.42
7.3.230.0030.01316.62
7.3.210.0100.00916.52
7.3.200.0120.00319.39
7.3.190.0090.00616.51
7.3.180.0100.00616.28
7.3.170.0060.01516.45
7.3.160.0190.00616.45
7.3.10.0210.00015.96
7.3.00.0140.00715.72
7.2.330.0120.00916.63
7.2.320.0060.00916.75
7.2.310.0030.01316.81
7.2.300.0140.00616.72
7.2.290.0140.00316.69
7.2.130.0150.00816.09
7.2.120.0150.00316.68
7.2.110.0120.01216.06
7.2.100.0140.00716.22
7.2.90.0160.00816.70
7.2.80.0310.00316.64
7.2.70.0140.00716.57
7.2.60.0100.01316.74
7.2.50.0170.00816.76
7.2.40.0180.00716.73
7.2.30.0100.01015.96
7.2.20.0190.00416.52
7.2.10.0260.00416.46
7.2.00.0090.00917.98
7.1.250.0120.01215.61
7.1.200.0030.00815.89
7.1.100.0070.00718.30
7.1.70.0000.00817.16
7.1.60.0120.01219.61
7.1.50.0140.01417.05
7.1.00.0030.07722.33
7.0.200.0000.00716.76
7.0.140.0030.07021.95
7.0.110.0100.08719.81
7.0.100.0070.08719.83
7.0.90.0000.08319.87
7.0.80.0070.07719.98
7.0.70.0200.06719.79
7.0.60.0130.07719.63
7.0.50.0100.07020.19
7.0.40.0030.05020.11
7.0.30.0000.09020.08
7.0.20.0070.08020.16
7.0.10.0070.08020.18
7.0.00.0070.08320.14
5.6.280.0000.07321.00
5.6.250.0100.08320.80
5.6.240.0030.08720.51
5.6.230.0100.08320.59
5.6.220.0070.05020.63
5.6.210.0170.07020.56
5.6.200.0100.08721.01
5.6.190.0130.07720.91
5.6.180.0070.08721.23
5.6.170.0100.08020.93
5.6.160.0100.07721.01
5.6.150.0100.07720.89
5.6.140.0130.08021.09
5.6.130.0100.08320.97
5.6.120.0070.08721.21
5.6.110.0070.06021.06
5.6.100.0100.06721.08
5.6.90.0030.08321.20
5.6.80.0070.08020.27
5.6.70.0100.07720.45
5.6.60.0100.06720.46
5.6.50.0030.07720.26
5.6.40.0100.07020.40
5.6.30.0070.07320.39
5.6.20.0100.05320.38
5.6.10.0000.04320.59
5.6.00.0070.04020.24
5.5.380.0070.05020.53
5.5.370.0030.08020.33
5.5.360.0100.07020.30
5.5.350.0070.08320.36
5.5.340.0200.07020.85
5.5.330.0070.07720.86
5.5.320.0000.08020.73
5.5.310.0070.08020.94
5.5.300.0170.07320.82
5.5.290.0070.08320.80
5.5.280.0100.07320.84
5.5.270.0000.09020.72
5.5.260.0170.06720.96
5.5.250.0070.07320.71
5.5.240.0100.04320.12
5.5.230.0070.08320.14
5.5.220.0070.08020.17
5.5.210.0070.07720.14
5.5.200.0070.08020.01
5.5.190.0170.06720.12
5.5.180.0000.05320.20
5.5.160.0030.05720.25
5.5.150.0030.04020.25
5.5.140.0070.05020.21
5.5.130.0000.04020.19
5.5.120.0030.07020.21
5.5.110.0100.03320.10
5.5.100.0030.05020.02
5.5.90.0030.05320.00
5.5.80.0070.06020.00
5.5.70.0070.05019.95
5.5.60.0100.04720.15
5.5.50.0030.03720.13
5.5.40.0130.03019.95
5.5.30.0000.04319.95
5.5.20.0100.06019.91
5.5.10.0030.04020.18
5.5.00.0070.03719.87
5.4.450.0070.07319.51
5.4.440.0200.06719.41
5.4.430.0030.07719.33
5.4.420.0070.07019.50
5.4.410.0230.06319.51
5.4.400.0100.08019.23
5.4.390.0100.07319.00
5.4.380.0100.06719.17
5.4.370.0030.05719.22
5.4.360.0030.07719.31
5.4.350.0030.05019.04
5.4.340.0070.06318.97
5.4.320.0070.05319.23
5.4.310.0070.03719.01
5.4.300.0030.03719.27
5.4.290.0070.03319.00
5.4.280.0000.04019.15
5.4.270.0000.04318.95
5.4.260.0100.03019.08
5.4.250.0100.03019.30
5.4.240.0000.06019.16
5.4.230.0070.05318.95
5.4.220.0070.04718.94
5.4.210.0030.03719.02
5.4.200.0030.06019.17
5.4.190.0000.06319.15
5.4.180.0000.04019.22
5.4.170.0070.03319.13
5.4.160.0000.05318.96
5.4.150.0070.03719.20
5.4.140.0030.03716.54
5.4.130.0000.05716.31
5.4.120.0030.04016.53
5.4.110.0030.05016.60
5.4.100.0000.03716.62
5.4.90.0100.02716.63
5.4.80.0030.04016.46
5.4.70.0100.02716.45
5.4.60.0070.05016.45
5.4.50.0070.05316.38
5.4.40.0030.04016.43
5.4.30.0030.03716.41
5.4.20.0000.03716.47
5.4.10.0000.04316.52
5.4.00.0070.03315.71
5.3.290.0070.04014.69
5.3.280.0070.06714.61
5.3.270.0030.05014.63
5.3.260.0000.04014.59
5.3.250.0030.03714.76
5.3.240.0100.03014.59
5.3.230.0100.03314.61
5.3.220.0070.06014.70
5.3.210.0030.06714.70
5.3.200.0030.04014.59
5.3.190.0000.04014.61
5.3.180.0000.04014.58
5.3.170.0100.03014.56
5.3.160.0070.03314.54
5.3.150.0100.03014.58
5.3.140.0070.03014.69
5.3.130.0070.03314.57
5.3.120.0070.03314.58
5.3.110.0100.06314.53
5.3.100.0100.03014.05
5.3.90.0070.03714.04
5.3.80.0000.04014.02
5.3.70.0070.03314.25
5.3.60.0000.04714.00
5.3.50.0030.07713.93
5.3.40.0000.07713.95
5.3.30.0100.05014.05
5.3.20.0100.06313.77
5.3.10.0070.07713.53
5.3.00.0070.07013.72
5.2.170.0070.02711.73
5.2.160.0030.03711.73
5.2.150.0000.05711.73
5.2.140.0030.06311.73
5.2.130.0070.05711.73
5.2.120.0100.05311.73
5.2.110.0030.03011.73
5.2.100.0030.06311.73
5.2.90.0030.05311.73
5.2.80.0070.04711.73
5.2.70.0170.05311.73
5.2.60.0030.05011.73
5.2.50.0030.05311.73
5.2.40.0100.04011.73
5.2.30.0030.06311.73
5.2.20.0030.05311.73
5.2.10.0130.04311.73
5.2.00.0130.05011.73
5.1.60.0030.03011.73
5.1.50.0100.04711.73
5.1.40.0000.05711.73
5.1.30.0070.05311.73
5.1.20.0030.06011.73
5.1.10.0070.04311.73
5.1.00.0100.05011.73
5.0.50.0100.04011.73
5.0.40.0100.03711.73
5.0.30.0070.05011.73
5.0.20.0030.04711.73
5.0.10.0000.04711.73
5.0.00.0100.04311.73
4.4.90.0030.01711.73
4.4.80.0030.03011.73
4.4.70.0000.03711.73
4.4.60.0000.02711.73
4.4.50.0070.02711.73
4.4.40.0070.05011.73
4.4.30.0000.03711.73
4.4.20.0000.03711.73
4.4.10.0100.01311.73
4.4.00.0130.02711.73
4.3.110.0070.03311.73
4.3.100.0000.03311.73
4.3.90.0030.03011.73
4.3.80.0030.05311.73
4.3.70.0030.03311.73
4.3.60.0070.03311.73
4.3.50.0000.03711.73
4.3.40.0070.04011.73
4.3.30.0030.03011.73
4.3.20.0000.03011.73
4.3.10.0000.04011.73
4.3.00.0000.03311.73

preferences:
44.82 ms | 401 KiB | 5 Q