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.60.0000.01818.57
8.3.50.0170.00322.05
8.3.40.0090.00618.67
8.3.30.0100.00320.17
8.3.20.0070.00020.16
8.3.10.0040.00422.02
8.3.00.0040.00422.57
8.2.180.0080.00816.63
8.2.170.0040.01122.96
8.2.160.0070.00722.13
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.11
8.2.110.0030.00720.97
8.2.100.0090.00317.78
8.2.90.0000.00918.22
8.2.80.0090.00018.09
8.2.70.0040.00417.63
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0030.00618.16
8.2.30.0050.00317.91
8.2.20.0040.00417.67
8.2.10.0040.00417.80
8.2.00.0020.00817.69
8.1.280.0110.00325.92
8.1.270.0100.00322.19
8.1.260.0030.00526.35
8.1.250.0060.00328.09
8.1.240.0060.00322.61
8.1.230.0060.00622.81
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0000.00817.51
8.1.180.0060.00319.01
8.1.170.0040.00418.59
8.1.160.0030.00322.15
8.1.150.0000.00718.64
8.1.140.0000.00717.40
8.1.130.0000.00717.83
8.1.120.0040.00417.41
8.1.110.0000.00717.29
8.1.100.0040.00417.43
8.1.90.0000.00917.40
8.1.80.0000.00717.28
8.1.70.0030.00317.36
8.1.60.0030.00617.61
8.1.50.0040.00417.53
8.1.40.0000.00717.43
8.1.30.0040.00417.63
8.1.20.0030.00617.55
8.1.10.0040.00417.58
8.1.00.0120.00017.53
8.0.300.0040.00419.93
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0040.00417.09
8.0.260.0030.00316.79
8.0.250.0040.00416.97
8.0.240.0000.00816.86
8.0.230.0070.00016.84
8.0.220.0040.00416.87
8.0.210.0030.00316.89
8.0.200.0000.00816.83
8.0.190.0050.00316.85
8.0.180.0000.00716.89
8.0.170.0000.00816.95
8.0.160.0030.00316.84
8.0.150.0000.00716.85
8.0.140.0000.00716.84
8.0.130.0000.00513.32
8.0.120.0040.00416.87
8.0.110.0070.00016.89
8.0.100.0070.00016.75
8.0.90.0000.00716.96
8.0.80.0140.00616.96
8.0.70.0000.00716.84
8.0.60.0040.00416.89
8.0.50.0030.00516.96
8.0.30.0110.00817.07
8.0.20.0110.00717.40
8.0.10.0000.00816.80
8.0.00.0090.01116.86
7.4.330.0050.00315.00
7.4.320.0060.00016.41
7.4.300.0060.00016.55
7.4.290.0030.00316.49
7.4.280.0040.00416.40
7.4.270.0080.00016.62
7.4.260.0030.00313.30
7.4.250.0080.00016.48
7.4.240.0040.00416.54
7.4.230.0030.00316.54
7.4.220.0100.01716.72
7.4.210.0030.01716.52
7.4.200.0040.00416.71
7.4.190.0030.00316.63
7.4.160.0130.00316.48
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0100.00816.52
7.4.120.0110.00716.57
7.4.110.0070.01116.52
7.4.100.0110.00816.58
7.4.90.0150.00316.43
7.4.80.0070.01019.39
7.4.70.0070.01016.50
7.4.60.0080.01216.58
7.4.50.0040.00416.56
7.4.40.0040.01522.77
7.4.30.0140.00316.63
7.4.00.0080.00615.17
7.3.330.0030.00313.25
7.3.320.0000.00613.39
7.3.310.0040.00416.39
7.3.300.0040.00416.27
7.3.290.0080.00716.40
7.3.280.0130.00316.37
7.3.270.0110.01117.40
7.3.260.0180.00616.52
7.3.250.0150.00416.60
7.3.240.0070.01016.61
7.3.230.0070.01016.61
7.3.210.0030.01316.45
7.3.200.0130.00319.39
7.3.190.0130.00316.47
7.3.180.0130.00416.33
7.3.170.0040.01216.44
7.3.160.0060.01016.43
7.3.120.0150.00014.92
7.2.330.0090.00916.80
7.2.320.0070.01016.64
7.2.310.0120.00916.69
7.2.300.0120.00916.75
7.2.290.0040.01316.56
7.2.60.0060.00616.99
7.1.200.0090.00315.56
7.1.70.0000.00917.24
7.1.60.0170.00719.43
7.1.50.0080.00416.95
7.1.00.0030.06722.39
7.0.200.0060.00616.97
7.0.140.0030.07321.95
7.0.60.0130.07719.84
7.0.50.0170.07017.88
7.0.40.0000.04720.27
7.0.30.0330.08020.33
7.0.20.0170.05020.19
7.0.10.0230.07720.30
7.0.00.0070.06720.06
5.6.280.0130.06720.92
5.6.210.0000.05320.68
5.6.200.0100.07718.22
5.6.190.0000.08020.45
5.6.180.0230.06020.67
5.6.170.0300.05720.57
5.6.160.0070.08320.44
5.6.150.0070.08318.29
5.6.140.0030.05318.14
5.6.130.0070.04318.26
5.6.120.0070.04021.02
5.6.110.0130.07720.98
5.6.100.0070.06321.02
5.6.90.0030.08721.09
5.6.80.0030.07320.53
5.6.70.0200.03320.42
5.5.350.0030.04320.39
5.5.340.0030.04018.02
5.5.330.0000.09020.37
5.5.320.0270.03720.27
5.5.310.0330.06320.30
5.5.300.0070.03718.07
5.5.290.0100.06017.95
5.5.280.0100.06720.79
5.5.270.0200.05020.77
5.5.260.0100.08720.98
5.5.250.0030.04320.51
5.5.240.0170.07020.17
5.4.450.0070.06319.27
5.4.440.0070.06019.44
5.4.430.0070.07719.18
5.4.420.0030.04319.48
5.4.410.0070.06319.28
5.4.400.0000.04318.86
5.4.390.0100.06319.24
5.4.380.0030.07019.21
5.4.370.0100.05719.12
5.4.360.0070.04319.14
5.4.350.0030.05318.89
5.4.340.0000.06319.14
5.4.320.0070.07718.85
5.4.310.0000.05018.86
5.4.300.0130.05319.16
5.4.290.0130.03018.97
5.4.280.0100.07319.07
5.4.270.0030.05019.02
5.4.260.0100.04018.97
5.4.250.0030.05319.14
5.4.240.0030.08319.07
5.4.230.0030.04318.97
5.4.220.0070.08019.13
5.4.210.0100.03719.00
5.4.200.0130.04019.20
5.4.190.0030.04019.07
5.4.180.0100.07319.21
5.4.170.0030.07319.23
5.4.160.0030.04719.13
5.4.150.0100.07719.10
5.4.140.0030.05316.57
5.4.130.0070.06316.59
5.4.120.0030.04316.51
5.4.110.0100.04316.51
5.4.100.0130.07016.51
5.4.90.0100.03716.32
5.4.80.0030.07716.52
5.4.70.0070.05716.44
5.4.60.0030.03716.29
5.4.50.0100.05016.50
5.4.40.0130.07016.36
5.4.30.0170.06316.44
5.4.20.0070.07016.46
5.4.10.0030.05016.30
5.4.00.0070.06015.95
5.3.290.0070.05714.60
5.3.280.0170.03714.75
5.3.270.0030.08014.51
5.3.260.0100.05714.77
5.3.250.0070.07714.67
5.3.240.0030.04714.67
5.3.230.0100.07014.62
5.3.220.0070.03714.61
5.3.210.0100.07014.58
5.3.200.0030.07314.73
5.3.190.0000.06014.61
5.3.180.0070.05314.57
5.3.170.0170.06014.63
5.3.160.0030.05314.60
5.3.150.0130.03714.59
5.3.140.0130.07314.73
5.3.130.0070.07014.70
5.3.120.0100.04014.56
5.3.110.0070.03314.64
5.3.100.0030.06314.06
5.3.90.0000.04014.05
5.3.80.0070.03314.09
5.3.70.0100.05714.00
5.3.60.0030.08013.93
5.3.50.0100.06314.04
5.3.40.0170.06014.02
5.3.30.0030.04713.92
5.3.20.0000.04713.67
5.3.10.0030.03713.82
5.3.00.0070.04313.66
5.2.170.0100.03311.05
5.2.160.0000.03311.13
5.2.150.0030.04011.32
5.2.140.0100.02711.19
5.2.130.0030.03011.18
5.2.120.0030.03011.01
5.2.110.0130.03011.13
5.2.100.0130.05311.12
5.2.90.0100.05711.18
5.2.80.0070.06011.17
5.2.70.0030.06311.18
5.2.60.0100.04710.98
5.2.50.0070.05011.04
5.2.40.0070.05011.03
5.2.30.0030.04310.99
5.2.20.0070.06311.02
5.2.10.0100.05710.87
5.2.00.0070.03010.69
5.1.60.0030.05710.15
5.1.50.0100.05010.02
5.1.40.0030.0409.97
5.1.30.0070.06010.41
5.1.20.0000.05710.41
5.1.10.0000.0539.99
5.1.00.0000.04010.10
5.0.50.0000.0309.21
5.0.40.0000.0409.21
5.0.30.0070.0679.21
5.0.20.0030.0479.21
5.0.10.0030.0479.21
5.0.00.0030.0639.21
4.4.90.0070.0279.21
4.4.80.0030.0309.21
4.4.70.0000.0409.21
4.4.60.0030.0309.21
4.4.50.0100.0239.21
4.4.40.0030.0279.21
4.4.30.0100.0239.21
4.4.20.0000.0179.21
4.4.10.0070.0179.21
4.4.00.0000.0409.21
4.3.110.0030.0239.21
4.3.100.0000.0409.21
4.3.90.0000.0339.21
4.3.80.0030.0509.21
4.3.70.0000.0339.21
4.3.60.0000.0379.21
4.3.50.0030.0339.21
4.3.40.0100.0479.21
4.3.30.0070.0279.21
4.3.20.0000.0409.21
4.3.10.0030.0139.21
4.3.00.0000.0339.21

preferences:
44.95 ms | 401 KiB | 5 Q