3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Doge { private $name; public function __construct($name) { $this->name = $name; } public function getName() { return $this->name; } public function equalsWithSameType(self $other) { return ($other->name === $this->name); } public function equalsWithSubType(DogeCoin $sub) { return ($sub->name === $this->name); } public function equalsWithRandomType(SomethingElseCompletely $whatever_man) { return ($whatever_man->name === $this->name); } } class DogeCoin extends Doge { private $name; } $first_doge = new Doge('a'); $second_doge = new Doge('a'); $doge_coin = new DogeCoin('a'); var_dump($first_doge->equalsWithSameType($second_doge)); var_dump($first_doge->equalsWithSubType($doge_coin));

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.0040.01518.30
8.3.50.0050.01121.33
8.3.40.0040.01118.80
8.3.30.0060.00920.21
8.3.20.0050.00320.22
8.3.10.0050.00321.92
8.3.00.0000.00722.39
8.2.180.0140.00718.43
8.2.170.0110.00422.96
8.2.160.0140.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00019.41
8.2.110.0040.00722.13
8.2.100.0070.00419.39
8.2.90.0050.00319.08
8.2.80.0060.00319.21
8.2.70.0080.00417.47
8.2.60.0060.00317.93
8.2.50.0060.00318.07
8.2.40.0040.00418.03
8.2.30.0070.00017.91
8.2.20.0040.00417.59
8.2.10.0030.00517.62
8.2.00.0020.00517.46
8.1.280.0110.00625.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0030.00623.84
8.1.230.0040.00719.21
8.1.220.0000.00817.74
8.1.210.0070.00318.77
8.1.200.0090.00017.22
8.1.190.0000.00817.41
8.1.180.0040.00420.20
8.1.170.0030.00518.46
8.1.160.0000.00722.16
8.1.150.0000.00718.53
8.1.140.0070.00017.47
8.1.130.0030.00617.88
8.1.120.0000.00717.43
8.1.110.0070.00017.39
8.1.100.0000.00717.40
8.1.90.0000.00717.34
8.1.80.0040.00417.45
8.1.70.0070.00017.42
8.1.60.0040.00417.60
8.1.50.0040.00417.56
8.1.40.0000.00717.57
8.1.30.0000.00817.63
8.1.20.0000.00817.65
8.1.10.0000.00917.47
8.1.00.0040.00817.45
8.0.300.0060.00318.77
8.0.290.0040.00416.93
8.0.280.0030.00318.39
8.0.270.0030.00317.18
8.0.260.0040.00416.74
8.0.250.0030.00316.98
8.0.240.0090.00016.94
8.0.230.0030.00316.96
8.0.220.0070.00016.83
8.0.210.0030.00316.83
8.0.200.0050.00316.98
8.0.190.0030.00316.99
8.0.180.0040.00716.98
8.0.170.0000.00816.84
8.0.160.0030.00316.88
8.0.150.0040.00416.81
8.0.140.0040.00416.90
8.0.130.0050.00013.33
8.0.120.0040.00416.97
8.0.110.0000.00816.74
8.0.100.0000.00716.95
8.0.90.0000.00716.93
8.0.80.0100.01016.80
8.0.70.0050.00316.73
8.0.60.0000.00816.89
8.0.50.0040.00416.78
8.0.30.0050.01617.13
8.0.20.0070.01217.40
8.0.10.0040.00416.90
8.0.00.0140.00516.75
7.4.330.0020.00215.08
7.4.320.0000.00616.65
7.4.300.0030.00316.51
7.4.290.0000.00716.53
7.4.280.0030.00316.39
7.4.270.0000.00716.52
7.4.260.0040.00416.41
7.4.250.0000.00816.46
7.4.240.0000.00716.59
7.4.230.0000.00616.60
7.4.220.0000.01516.53
7.4.210.0090.00716.52
7.4.200.0030.00316.63
7.4.190.0030.00316.77
7.4.160.0100.00716.45
7.4.150.0040.01417.40
7.4.140.0090.01217.86
7.4.130.0110.00816.52
7.4.120.0090.00816.65
7.4.110.0030.01616.56
7.4.100.0000.01816.56
7.4.90.0090.00916.59
7.4.80.0140.00419.39
7.4.70.0100.01316.54
7.4.60.0070.01016.52
7.4.50.0040.00416.53
7.4.40.0040.01122.77
7.4.30.0070.01416.48
7.4.00.0040.01114.83
7.3.330.0060.00013.29
7.3.320.0030.00313.14
7.3.310.0070.00016.35
7.3.300.0040.00416.13
7.3.290.0030.01216.26
7.3.280.0060.01116.29
7.3.270.0080.00817.40
7.3.260.0070.01116.49
7.3.250.0120.01116.41
7.3.240.0030.01516.46
7.3.230.0130.00416.50
7.3.210.0130.00316.16
7.3.200.0140.00316.24
7.3.190.0090.01316.36
7.3.180.0030.01316.23
7.3.170.0130.00316.27
7.3.160.0000.01916.50
7.3.120.0050.00914.82
7.3.10.0030.00716.41
7.3.00.0060.00916.55
7.2.330.0060.01216.43
7.2.320.0120.00616.71
7.2.310.0170.00716.39
7.2.300.0100.01016.74
7.2.290.0100.00616.56
7.2.130.0100.00316.47
7.2.120.0030.00716.69
7.2.110.0040.01116.62
7.2.100.0080.00416.84
7.2.90.0030.01016.77
7.2.80.0030.01216.42
7.2.70.0030.00716.77
7.2.60.0100.00316.72
7.2.50.0040.01116.27
7.2.40.0030.01016.71
7.2.30.0030.00916.77
7.2.20.0000.00916.69
7.2.10.0100.00016.48
7.2.00.0100.00316.90
7.1.250.0070.00315.69
7.1.200.0060.00615.98
7.1.70.0120.00017.21
7.1.60.0100.01619.21
7.1.50.0130.01016.86
7.1.00.0030.06722.40
7.0.200.0280.00414.77
7.0.140.0030.07322.04
7.0.60.0100.07320.03
7.0.50.0000.04317.88
7.0.40.0070.08019.96
7.0.30.0400.06020.25
7.0.20.0300.07720.06
7.0.10.0430.07320.12
7.0.00.0100.03320.09
5.6.280.0030.07320.92
5.6.210.0070.08020.67
5.6.200.0130.08318.23
5.6.190.0130.08720.56
5.6.180.0330.07720.61
5.6.170.0230.04320.47
5.6.160.0100.03720.71
5.6.150.0030.04018.15
5.6.140.0070.05318.15
5.6.130.0070.04318.27
5.6.120.0100.07721.11
5.6.110.0100.06721.00
5.6.100.0100.08320.98
5.6.90.0030.04721.10
5.6.80.0130.07720.41
5.6.70.0170.07720.41
5.5.350.0070.07720.29
5.5.340.0070.04317.98
5.5.330.0100.04020.47
5.5.320.0230.05320.20
5.5.310.0100.05020.36
5.5.300.0070.06717.98
5.5.290.0130.06717.93
5.5.280.0100.08020.88
5.5.270.0130.07320.90
5.5.260.0170.05720.96
5.5.250.0130.07020.79
5.5.240.0030.04020.16
5.4.450.0230.04019.55
5.4.440.0170.04319.49
5.4.430.0130.04719.34
5.4.420.0130.04319.27
5.4.410.0230.03019.39
5.4.400.0300.05718.86
5.4.390.0170.03719.08
5.4.380.0170.03719.06
5.4.370.0130.03719.00
5.4.360.0100.04719.07
5.4.350.0130.03719.14
5.4.340.0170.03319.16
5.4.320.0130.04019.00
5.4.310.0070.04318.87
5.4.300.0230.03319.09
5.4.290.0200.04018.84
5.4.280.0130.04318.94
5.4.270.0100.04018.85
5.4.260.0070.04319.15
5.4.250.0170.03319.23
5.4.240.0200.03719.08
5.4.230.0200.05318.99
5.4.220.0300.05319.19
5.4.210.0330.03319.13
5.4.200.0270.07319.21
5.4.190.0270.06319.14
5.4.180.0230.04719.07
5.4.170.0270.06719.09
5.4.160.0330.06319.14
5.4.150.0230.06719.16
5.4.140.0170.04716.57
5.4.130.0300.04316.40
5.4.120.0330.05016.46
5.4.110.0270.05316.32
5.4.100.0200.07316.59
5.4.90.0200.05016.45
5.4.80.0270.03316.44
5.4.70.0370.02316.54
5.4.60.0230.04716.52
5.4.50.0230.06016.25
5.4.40.0200.04316.52
5.4.30.0200.03716.42
5.4.20.0200.04716.51
5.4.10.0370.06016.34
5.4.00.0200.08015.95
5.3.290.0100.04714.68
5.3.280.0270.05314.51
5.3.270.0230.04714.70
5.3.260.0230.07314.53
5.3.250.0270.06714.67
5.3.240.0230.07714.69
5.3.230.0230.06314.53
5.3.220.0230.04314.50
5.3.210.0300.06714.63
5.3.200.0270.06714.55
5.3.190.0270.03714.66
5.3.180.0270.05314.66
5.3.170.0170.05314.50
5.3.160.0200.05714.55
5.3.150.0170.06014.49
5.3.140.0230.05714.54
5.3.130.0300.06314.48
5.3.120.0200.07014.72
5.3.110.0270.07314.64
5.3.100.0330.06014.17
5.3.90.0200.06714.25
5.3.80.0270.06714.05
5.3.70.0300.06714.03
5.3.60.0200.05713.94
5.3.50.0200.04713.97
5.3.40.0230.07013.97
5.3.30.0230.04313.84
5.3.20.0370.06013.72
5.3.10.0230.04313.64
5.3.00.0300.06313.71
5.2.170.0200.03312.08
5.2.160.0130.03012.08
5.2.150.0230.04312.08
5.2.140.0200.05712.08
5.2.130.0170.03312.08
5.2.120.0170.06312.08
5.2.110.0200.05312.08
5.2.100.0270.05012.08
5.2.90.0200.05712.08
5.2.80.0170.05712.08
5.2.70.0330.05312.08
5.2.60.0170.05012.08
5.2.50.0230.05012.08
5.2.40.0170.06312.08
5.2.30.0170.05712.08
5.2.20.0130.05012.08
5.2.10.0170.04012.08
5.2.00.0130.05712.08
5.1.60.0200.05012.08
5.1.50.0170.03312.08
5.1.40.0200.04712.08
5.1.30.0200.05312.08
5.1.20.0200.05312.08
5.1.10.0170.04712.08
5.1.00.0130.03312.08
5.0.50.0100.04012.08
5.0.40.0100.02712.08
5.0.30.0070.04312.08
5.0.20.0170.03712.08
5.0.10.0070.04312.08
5.0.00.0170.05312.08
4.4.90.0100.02712.08
4.4.80.0130.01712.08
4.4.70.0070.03712.08
4.4.60.0070.03012.08
4.4.50.0070.03012.08
4.4.40.0070.05012.08
4.4.30.0070.03712.08
4.4.20.0100.02712.08
4.4.10.0100.03012.08
4.4.00.0070.05712.08
4.3.110.0070.02012.08
4.3.100.0100.02012.08
4.3.90.0070.03312.08
4.3.80.0130.05012.08
4.3.70.0170.03012.08
4.3.60.0070.03712.08
4.3.50.0170.02712.08
4.3.40.0130.03312.08
4.3.30.0030.02012.08
4.3.20.0100.02712.08
4.3.10.0000.03712.08
4.3.00.0030.03312.08

preferences:
43.22 ms | 401 KiB | 5 Q