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; } class SomethingElseCompletely { private $name; public function __construct($name) { $this->name = $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)); var_dump($first_doge->equalsWithRandomType($something_else_completely));

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.40.0070.01018.88
8.3.30.0120.00320.29
8.3.20.0000.00820.26
8.3.10.0050.00322.09
8.3.00.0040.00422.37
8.2.170.0040.01122.96
8.2.160.0070.01020.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00619.64
8.2.110.0050.00522.09
8.2.100.0060.00619.47
8.2.90.0040.00419.05
8.2.80.0060.00319.21
8.2.70.0060.00317.36
8.2.60.0040.01117.79
8.2.50.0040.00418.07
8.2.40.0040.00418.09
8.2.30.0070.00017.92
8.2.20.0040.00417.73
8.2.10.0040.00417.70
8.2.00.0070.00017.56
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0000.00923.79
8.1.230.0040.00719.07
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0090.00017.35
8.1.190.0040.00417.50
8.1.180.0000.00720.10
8.1.170.0050.00318.39
8.1.160.0070.00022.09
8.1.150.0040.00418.57
8.1.140.0000.00717.41
8.1.130.0040.00417.90
8.1.120.0030.00317.43
8.1.110.0070.00017.30
8.1.100.0000.00817.39
8.1.90.0040.00417.44
8.1.80.0050.00217.46
8.1.70.0070.00017.40
8.1.60.0050.00317.59
8.1.50.0040.00417.53
8.1.40.0080.00017.52
8.1.30.0030.00517.68
8.1.20.0030.00517.59
8.1.10.0050.00317.60
8.1.00.0090.00317.54
8.0.300.0040.00418.77
8.0.290.0040.00417.16
8.0.280.0030.00318.26
8.0.270.0000.00817.13
8.0.260.0030.00316.83
8.0.250.0000.00716.88
8.0.240.0000.01116.84
8.0.230.0030.00316.84
8.0.220.0030.00416.82
8.0.210.0030.00316.90
8.0.200.0050.00316.95
8.0.190.0060.00316.94
8.0.180.0000.00816.89
8.0.170.0050.00316.94
8.0.160.0000.00716.94
8.0.150.0040.00416.84
8.0.140.0040.00416.77
8.0.130.0000.00513.33
8.0.120.0080.00016.88
8.0.110.0040.00416.72
8.0.100.0080.00016.95
8.0.90.0000.00716.85
8.0.80.0070.01416.79
8.0.70.0000.00716.80
8.0.60.0040.00416.85
8.0.50.0050.00216.91
8.0.30.0060.01317.23
8.0.20.0090.01017.40
8.0.10.0050.00316.91
8.0.00.0100.01116.63
7.4.330.0020.00215.00
7.4.320.0060.00016.66
7.4.300.0060.00016.61
7.4.290.0000.00716.64
7.4.280.0030.00316.58
7.4.270.0070.00016.61
7.4.260.0040.00416.45
7.4.250.0040.00416.57
7.4.240.0020.00616.57
7.4.230.0040.00416.49
7.4.220.0060.01016.70
7.4.210.0090.00616.61
7.4.200.0000.00716.50
7.4.190.0070.00016.58
7.4.160.0110.00716.57
7.4.150.0030.01417.40
7.4.140.0090.01017.86
7.4.130.0090.00716.59
7.4.120.0130.00616.50
7.4.110.0100.00716.63
7.4.100.0060.01216.57
7.4.90.0130.00716.68
7.4.80.0120.01619.39
7.4.70.0070.01016.63
7.4.60.0040.01516.61
7.4.50.0040.00416.45
7.4.40.0120.00322.77
7.4.30.0090.01216.51
7.4.00.0030.00915.02
7.3.330.0050.00013.34
7.3.320.0000.00513.40
7.3.310.0030.00316.49
7.3.300.0000.00716.30
7.3.290.0070.00716.37
7.3.280.0090.00816.42
7.3.270.0130.00717.40
7.3.260.0000.02316.43
7.3.250.0090.01416.43
7.3.240.0120.00916.66
7.3.230.0070.01016.59
7.3.210.0080.00816.45
7.3.200.0070.01619.39
7.3.190.0060.01016.48
7.3.180.0120.00416.40
7.3.170.0150.00416.59
7.3.160.0110.00516.41
7.3.120.0100.00714.88
7.2.330.0060.01216.56
7.2.320.0150.00616.82
7.2.310.0030.01916.44
7.2.300.0040.01616.66
7.2.290.0110.00516.77
7.2.60.0130.00316.88
7.2.00.0060.00619.35
7.1.200.0070.00315.84
7.1.70.0050.00317.09
7.1.60.0060.01919.21
7.1.50.0030.01716.61
7.1.00.0070.03022.26
7.0.200.0060.01316.86
7.0.140.0070.07022.07
7.0.60.0130.07019.84
7.0.50.0030.08717.89
7.0.40.0030.08720.39
7.0.30.0600.07020.24
7.0.20.0400.06320.19
7.0.10.0370.07020.17
7.0.00.0030.04320.09
5.6.210.0070.08020.67
5.6.200.0030.04018.17
5.6.190.0030.04320.62
5.6.180.0100.07320.59
5.6.170.0300.04020.42
5.6.160.0070.08720.56
5.6.150.0070.04318.19
5.6.140.0030.04318.18
5.6.130.0030.04018.29
5.6.120.0130.08321.13
5.6.110.0130.07321.04
5.6.100.0100.04721.12
5.6.90.0200.07021.01
5.6.80.0200.07020.52
5.5.350.0070.08020.41
5.5.340.0000.05317.99
5.5.330.0100.08020.35
5.5.320.0030.08720.41
5.5.310.0370.06720.23
5.5.300.0030.05717.95
5.5.290.0170.07317.98
5.5.280.0200.07320.88
5.5.270.0070.07020.66
5.5.260.0100.07720.88
5.5.250.0170.08320.47
5.5.240.0030.04720.08
5.4.450.0600.06319.52
5.4.440.0300.05719.58
5.4.430.0230.05319.46
5.4.420.0170.06319.43
5.4.410.0200.05319.46
5.4.400.0200.05319.14
5.4.390.0230.05719.23
5.4.380.0170.05018.51
5.4.370.0170.04318.76
5.4.360.0070.05318.70
5.4.350.0100.03512.03
5.4.340.0070.03812.02
5.4.320.0080.03412.52
5.4.310.0080.04512.51
5.4.300.0080.04412.51
5.4.290.0100.03612.50
5.4.280.0110.05512.41
5.4.270.0030.04112.41
5.4.260.0050.04012.41
5.4.250.0070.05318.94
5.4.240.0070.06018.84
5.4.230.0100.06718.99
5.4.220.0100.06719.04
5.4.210.0170.07018.99
5.4.200.0070.05018.80
5.4.190.0100.05018.96
5.4.180.0070.05719.11
5.4.170.0130.06318.93
5.4.160.0070.08018.76
5.4.150.0100.06318.75
5.4.140.0130.06316.42
5.4.130.0100.06316.46
5.4.120.0070.06316.48
5.4.110.0030.05316.39
5.4.100.0100.06716.47
5.4.90.0100.05016.48
5.4.80.0100.05316.45
5.4.70.0130.05716.52
5.4.60.0170.06716.32
5.4.50.0200.05716.47
5.4.40.0130.05316.39
5.4.30.0130.07016.39
5.4.20.0170.04016.48
5.4.10.0100.05316.54
5.4.00.0070.05015.97
5.3.290.0080.04112.80
5.3.280.0130.05014.53
5.3.270.0130.06714.45
5.3.260.0130.05314.84
5.3.250.0170.06314.59
5.3.240.0230.05314.62
5.3.230.0130.06014.79
5.3.220.0130.06014.71
5.3.210.0200.06014.66
5.3.200.0100.05714.74
5.3.190.0200.05314.76
5.3.180.0130.05714.41
5.3.170.0170.07014.59
5.3.160.0170.06714.56
5.3.150.0130.04714.71
5.3.140.0200.05714.47
5.3.130.0130.04714.56
5.3.120.0230.06314.71
5.3.110.0030.06314.54
5.3.100.0130.04314.19
5.3.90.0100.07014.00
5.3.80.0100.06713.88
5.3.70.0100.05314.10
5.3.60.0100.05013.98
5.3.50.0030.07713.96
5.3.40.0130.04313.96
5.3.30.0170.06313.91
5.3.20.0170.06313.93
5.3.10.0170.06313.65
5.3.00.0130.04713.64
5.2.170.0000.04711.34
5.2.160.0030.04311.16
5.2.150.0130.04311.11
5.2.140.0030.04311.24
5.2.130.0100.05711.20
5.2.120.0000.04311.20
5.2.110.0070.03711.21
5.2.100.0170.04011.20
5.2.90.0030.04711.27
5.2.80.0030.04711.17
5.2.70.0030.04310.94
5.2.60.0100.05011.23
5.2.50.0100.03711.04
5.2.40.0130.04310.96
5.2.30.0030.05011.07
5.2.20.0100.03310.96
5.2.10.0170.04011.03
5.2.00.0200.04010.96
5.1.60.0100.03010.24
5.1.50.0030.04310.24
5.1.40.0030.04710.24
5.1.30.0070.05010.37
5.1.20.0070.05010.45
5.1.10.0030.04710.24
5.1.00.0100.04710.24
5.0.50.0030.04310.24
5.0.40.0070.04010.24
5.0.30.0000.05010.24
5.0.20.0000.04010.24
5.0.10.0100.03010.24
5.0.00.0070.04710.24
4.4.90.0030.03010.24
4.4.80.0070.02010.24
4.4.70.0030.02310.24
4.4.60.0030.02310.24
4.4.50.0070.02310.24
4.4.40.0000.05010.24
4.4.30.0030.02710.24
4.4.20.0070.02710.24
4.4.10.0000.02310.24
4.4.00.0100.03310.24
4.3.110.0000.03010.24
4.3.100.0100.01710.24
4.3.90.0030.02010.24
4.3.80.0030.03310.24
4.3.70.0100.02310.24
4.3.60.0030.02010.24
4.3.50.0030.02310.24
4.3.40.0070.03710.24
4.3.30.0030.03010.24
4.3.20.0030.02010.24
4.3.10.0030.03010.24
4.3.00.0070.0207.26

preferences:
43.82 ms | 400 KiB | 5 Q