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'); $something_else_completely = new SomethingElseCompletely('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.0060.00916.50
8.3.50.0270.00516.47
8.3.40.0120.00618.88
8.3.30.0110.00418.92
8.3.20.0060.00318.76
8.3.10.0080.00020.47
8.3.00.0040.00419.51
8.2.180.0090.00918.66
8.2.170.0120.00322.96
8.2.160.0130.00321.02
8.2.150.0000.00924.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0080.00020.75
8.2.110.0030.00619.38
8.2.100.0040.00817.91
8.2.90.0030.00619.17
8.2.80.0040.00419.39
8.2.70.0050.00517.60
8.2.60.0050.00317.80
8.2.50.0040.00419.23
8.2.40.0000.00818.03
8.2.30.0000.00818.02
8.2.20.0050.00217.58
8.2.10.0040.00417.65
8.2.00.0020.00517.67
8.1.280.0100.01025.92
8.1.270.0090.00023.99
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00622.33
8.1.230.0040.00820.91
8.1.220.0060.00317.74
8.1.210.0080.00018.84
8.1.200.0050.00517.23
8.1.190.0060.00317.53
8.1.180.0080.00018.10
8.1.170.0080.00018.89
8.1.160.0030.00618.85
8.1.150.0070.00018.63
8.1.140.0030.00517.33
8.1.130.0000.00717.88
8.1.120.0000.00717.48
8.1.110.0000.00717.36
8.1.100.0070.00017.36
8.1.90.0050.00217.37
8.1.80.0030.00317.34
8.1.70.0000.00717.27
8.1.60.0030.00617.62
8.1.50.0030.00617.43
8.1.40.0060.00317.57
8.1.30.0000.00717.65
8.1.20.0000.00817.62
8.1.10.0040.00417.48
8.1.00.0080.00017.40
8.0.300.0040.00419.95
8.0.290.0060.00316.75
8.0.280.0030.00518.39
8.0.270.0050.00317.20
8.0.260.0000.00718.66
8.0.250.0040.00416.92
8.0.240.0070.00016.85
8.0.230.0030.00316.86
8.0.220.0000.00816.83
8.0.210.0000.00716.83
8.0.200.0030.00316.97
8.0.190.0000.00716.95
8.0.180.0000.00816.91
8.0.170.0090.00016.81
8.0.160.0000.00717.02
8.0.150.0030.00516.80
8.0.140.0040.00716.84
8.0.130.0030.00313.30
8.0.120.0000.00816.83
8.0.110.0070.00016.75
8.0.100.0040.00416.84
8.0.90.0040.00416.89
8.0.80.0040.01216.86
8.0.70.0040.00416.81
8.0.60.0050.00316.97
8.0.50.0000.00816.96
8.0.30.0090.00917.09
8.0.20.0070.01217.25
8.0.10.0020.00517.08
8.0.00.0140.00516.57
7.4.330.0060.00012.92
7.4.320.0060.00016.55
7.4.300.0030.00316.61
7.4.290.0070.00016.55
7.4.280.0080.00016.48
7.4.270.0070.00016.57
7.4.260.0060.00013.29
7.4.250.0000.00816.51
7.4.240.0030.00316.66
7.4.230.0040.00416.55
7.4.220.0130.01616.68
7.4.210.0030.01216.59
7.4.200.0050.00316.69
7.4.190.0070.00016.48
7.4.160.0060.01016.60
7.4.150.0120.00616.52
7.4.140.0080.01216.52
7.4.130.0080.01216.65
7.4.120.0060.01116.52
7.4.110.0070.01016.45
7.4.100.0070.01116.30
7.4.90.0150.00616.53
7.4.80.0060.01119.39
7.4.70.0030.01316.49
7.4.60.0000.01616.49
7.4.50.0040.00816.52
7.4.40.0000.01416.46
7.4.30.0100.01016.56
7.4.00.0060.01015.05
7.3.330.0030.00313.43
7.3.320.0000.00513.23
7.3.310.0050.00216.24
7.3.300.0070.00016.38
7.3.290.0030.01616.34
7.3.280.0110.00716.39
7.3.270.0070.01016.22
7.3.260.0060.01716.55
7.3.250.0130.00916.60
7.3.240.0130.00316.50
7.3.230.0070.01116.50
7.3.210.0040.01216.37
7.3.200.0090.00916.52
7.3.190.0040.01116.38
7.3.180.0000.01516.46
7.3.170.0070.01516.36
7.3.160.0060.01016.50
7.3.120.0030.01015.06
7.3.10.0030.01416.23
7.3.00.0100.00216.43
7.2.330.0100.01316.70
7.2.320.0120.01216.39
7.2.310.0070.01016.55
7.2.300.0100.00716.54
7.2.290.0120.00416.76
7.2.130.0030.01016.87
7.2.120.0080.00616.77
7.2.110.0060.00816.86
7.2.100.0030.01216.96
7.2.90.0060.00716.89
7.2.80.0080.00716.67
7.2.70.0070.00916.59
7.2.60.0070.00716.79
7.2.50.0050.01016.69
7.2.40.0030.01416.72
7.2.30.0110.00316.96
7.2.20.0050.00816.66
7.2.10.0050.00716.84
7.2.00.0060.00917.75
7.1.250.0070.00715.59
7.1.200.0060.00615.59
7.1.100.0060.00618.06
7.1.70.0000.00817.09
7.1.60.0000.02419.40
7.1.50.0060.01016.80
7.1.00.0100.06722.51
7.0.200.0500.00414.54
7.0.140.0130.06021.94
7.0.120.0130.06322.18
7.0.60.0070.08320.01
7.0.50.0030.07717.89
7.0.40.0300.08720.09
7.0.30.0370.05020.18
7.0.20.0300.08020.25
7.0.10.0270.06320.14
7.0.00.0400.06720.41
5.6.280.0030.07320.99
5.6.210.0000.06020.65
5.6.200.0100.04318.16
5.6.190.0300.07720.58
5.6.180.0330.08020.64
5.6.170.0230.04320.77
5.6.160.0300.07320.47
5.6.150.0370.06320.32
5.6.140.0300.06320.37
5.6.130.0270.06320.50
5.6.120.0270.04320.23
5.6.110.0400.07720.43
5.6.100.0270.05020.43
5.6.90.0300.07320.39
5.6.80.0270.03719.72
5.6.70.0330.07019.78
5.6.60.0500.04719.55
5.6.50.0370.07019.79
5.6.40.0370.07319.76
5.6.30.0200.05319.73
5.6.20.0370.07319.70
5.6.10.0370.07319.53
5.6.00.0300.07719.79
5.5.350.0030.08720.43
5.5.340.0030.04317.97
5.5.330.0270.07020.13
5.5.320.0300.08320.30
5.5.310.0330.07320.40
5.5.300.0300.07719.99
5.5.290.0370.06720.00
5.5.280.0300.06720.33
5.5.270.0230.07020.23
5.5.260.0300.08020.16
5.5.250.0230.05319.95
5.5.240.0270.06019.47
5.5.230.0300.06719.35
5.5.220.0330.04719.58
5.5.210.0300.06019.58
5.5.200.0230.04019.53
5.5.190.0270.08019.32
5.5.180.0270.05019.48
5.5.160.0370.04719.65
5.5.150.0300.04719.56
5.5.140.0270.03319.68
5.5.130.0270.05019.55
5.5.120.0230.05019.52
5.5.110.0270.04019.52
5.5.100.0300.05319.47
5.5.90.0300.06019.57
5.5.80.0330.06719.43
5.5.70.0270.05719.21
5.5.60.0330.05319.56
5.5.50.0270.06719.53
5.5.40.0230.04019.32
5.5.30.0270.03719.38
5.5.20.0230.04019.52
5.5.10.0270.04719.48
5.5.00.0270.06019.44
5.4.450.0330.04319.19
5.4.440.0300.07719.43
5.4.430.0270.07719.44
5.4.420.0270.06719.38
5.4.410.0400.06019.41
5.4.400.0300.07018.93
5.4.390.0330.06719.24
5.4.380.0230.06019.12
5.4.370.0330.07318.98
5.4.360.0400.07318.94
5.4.350.0330.06019.15
5.4.340.0330.04019.20
5.4.320.0270.07319.25
5.4.310.0370.06319.00
5.4.300.0300.03019.26
5.4.290.0330.06718.87
5.4.280.0300.07318.93
5.4.270.0400.06719.14
5.4.260.0200.04019.15
5.4.250.0270.04719.00
5.4.240.0330.07018.84
5.4.230.0300.05019.23
5.4.220.0330.06719.15
5.4.210.0300.04318.99
5.4.200.0270.05319.14
5.4.190.0200.04018.91
5.4.180.0270.03319.00
5.4.170.0230.04019.14
5.4.160.0200.05319.09
5.4.150.0230.04719.14
5.4.140.0270.05316.31
5.4.130.0270.04016.56
5.4.120.0270.03316.36
5.4.110.0300.06716.59
5.4.100.0300.07016.55
5.4.90.0200.08016.33
5.4.80.0370.06016.51
5.4.70.0370.06716.49
5.4.60.0300.04016.27
5.4.50.0330.06316.64
5.4.40.0300.03316.64
5.4.30.0300.06716.38
5.4.20.0370.05016.34
5.4.10.0200.04316.51
5.4.00.0170.04015.86
5.3.290.0270.06014.72
5.3.280.0270.05014.68
5.3.270.0430.06014.52
5.3.260.0200.05014.50
5.3.250.0400.06014.67
5.3.240.0230.07714.62
5.3.230.0330.04714.64
5.3.220.0270.04314.63
5.3.210.0430.05314.61
5.3.200.0370.06714.62
5.3.190.0370.06714.63
5.3.180.0270.07314.73
5.3.170.0370.06014.46
5.3.160.0200.04314.58
5.3.150.0300.07314.64
5.3.140.0300.07314.61
5.3.130.0370.06714.71
5.3.120.0330.06314.72
5.3.110.0400.04314.58
5.3.100.0170.04314.19
5.3.90.0230.03714.03
5.3.80.0270.07014.02
5.3.70.0300.07314.18
5.3.60.0300.04314.07
5.3.50.0300.05313.92
5.3.40.0270.06014.00
5.3.30.0270.04013.93
5.3.20.0300.06713.74
5.3.10.0230.07313.82
5.3.00.0270.07013.67
5.2.170.0200.03012.80
5.2.160.0270.05012.80
5.2.150.0230.06312.80
5.2.140.0270.04312.80
5.2.130.0270.03312.80
5.2.120.0200.03012.80
5.2.110.0270.05312.80
5.2.100.0270.04312.80
5.2.90.0300.05012.80
5.2.80.0300.05712.80
5.2.70.0270.06312.80
5.2.60.0330.05312.80
5.2.50.0230.03312.80
5.2.40.0300.04712.80
5.2.30.0230.05012.80
5.2.20.0200.03312.80
5.2.10.0200.06012.80
5.2.00.0170.04012.80
5.1.60.0170.02312.80
5.1.50.0200.02712.80
5.1.40.0270.04012.80
5.1.30.0170.05712.80
5.1.20.0230.04012.80
5.1.10.0200.04712.80
5.1.00.0170.03712.80
5.0.50.0200.03712.80
5.0.40.0130.04012.80
5.0.30.0100.04712.80
5.0.20.0100.03712.80
5.0.10.0170.04012.80
5.0.00.0070.04712.80
4.4.90.0100.02712.80
4.4.80.0170.03012.80
4.4.70.0070.02712.80
4.4.60.0130.01712.80
4.4.50.0130.01712.80
4.4.40.0130.03712.80
4.4.30.0100.03712.80
4.4.20.0100.03312.80
4.4.10.0070.02712.80
4.4.00.0100.04312.80
4.3.110.0100.02012.80
4.3.100.0070.02012.80
4.3.90.0130.03012.80
4.3.80.0070.03312.80
4.3.70.0100.01712.80
4.3.60.0070.02012.80
4.3.50.0170.02312.80
4.3.40.0070.03012.80
4.3.30.0070.01712.80
4.3.20.0100.02712.80
4.3.10.0100.03312.80
4.3.00.0100.03312.80

preferences:
49.23 ms | 401 KiB | 5 Q