3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Doge { private $name = "Testing"; public function __construct($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; public function foo(Doge $d){ return ($d->name === $this->name); } } $first_doge = new Doge('a'); $second_doge = new Doge('a'); $doge_coin = new DogeCoin('a'); $doge_coin->foo($first_doge);

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.0100.01318.43
8.3.50.0100.00821.15
8.3.40.0150.00018.51
8.3.30.0070.00720.35
8.3.20.0090.00020.16
8.3.10.0040.00421.98
8.3.00.0080.00022.39
8.2.180.0180.00417.00
8.2.170.0140.00422.96
8.2.160.0070.00720.34
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0100.00726.16
8.2.120.0070.00019.54
8.2.110.0040.00422.16
8.2.100.0070.00419.34
8.2.90.0030.00619.05
8.2.80.0000.00819.08
8.2.70.0040.00417.50
8.2.60.0060.00317.80
8.2.50.0030.00518.07
8.2.40.0040.00417.97
8.2.30.0000.00718.07
8.2.20.0040.00417.66
8.2.10.0040.00417.62
8.2.00.0040.00417.70
8.1.280.0100.01025.92
8.1.270.0070.00024.66
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.73
8.1.230.0120.00019.01
8.1.220.0100.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00817.53
8.1.180.0070.00019.98
8.1.170.0080.00018.46
8.1.160.0000.00722.01
8.1.150.0040.00418.52
8.1.140.0070.00017.32
8.1.130.0090.00017.78
8.1.120.0070.00017.41
8.1.110.0040.00417.48
8.1.100.0080.00017.43
8.1.90.0080.00017.40
8.1.80.0040.00417.34
8.1.70.0000.00717.39
8.1.60.0080.00017.53
8.1.50.0040.00417.44
8.1.40.0040.00417.57
8.1.30.0020.00517.48
8.1.20.0030.00517.57
8.1.10.0030.00617.51
8.1.00.0000.01017.41
8.0.300.0000.00718.77
8.0.290.0000.00717.18
8.0.280.0070.00018.44
8.0.270.0000.00717.17
8.0.260.0030.00316.89
8.0.250.0070.00016.84
8.0.240.0120.00016.84
8.0.230.0070.00016.88
8.0.220.0000.00716.84
8.0.210.0030.00316.79
8.0.200.0030.00316.95
8.0.190.0050.00316.96
8.0.180.0090.00016.99
8.0.170.0040.00416.82
8.0.160.0030.00316.87
8.0.150.0080.00016.91
8.0.140.0000.00816.90
8.0.130.0060.00013.37
8.0.120.0050.00216.77
8.0.110.0050.00216.81
8.0.100.0000.00716.86
8.0.90.0040.00416.91
8.0.80.0060.01016.92
8.0.70.0040.00416.92
8.0.60.0040.00416.76
8.0.50.0000.00716.89
8.0.30.0170.00717.02
8.0.20.0090.01017.45
8.0.10.0080.00017.06
8.0.00.0080.01316.95
7.4.330.0060.00015.00
7.4.320.0060.00016.46
7.4.300.0040.00416.50
7.4.290.0040.00416.45
7.4.280.0000.00716.59
7.4.270.0040.00416.63
7.4.260.0070.00016.53
7.4.250.0000.00716.59
7.4.240.0030.00316.55
7.4.230.0020.00516.73
7.4.220.0130.00716.46
7.4.210.0110.00616.55
7.4.200.0030.00316.33
7.4.190.0000.00716.55
7.4.160.0110.00516.39
7.4.150.0050.01117.40
7.4.140.0070.01717.86
7.4.130.0120.00516.44
7.4.120.0090.00916.55
7.4.110.0110.00516.64
7.4.100.0100.01016.47
7.4.90.0100.01216.63
7.4.80.0120.00919.39
7.4.70.0110.00816.53
7.4.60.0110.00416.39
7.4.50.0060.00316.28
7.4.40.0080.00422.77
7.4.30.0100.00616.44
7.4.00.0080.00514.50
7.3.330.0020.00313.20
7.3.320.0000.00513.21
7.3.310.0030.00316.26
7.3.300.0000.00616.42
7.3.290.0070.00716.30
7.3.280.0070.00916.34
7.3.270.0070.01017.40
7.3.260.0170.00816.69
7.3.250.0110.01116.43
7.3.240.0100.01316.32
7.3.230.0040.01516.39
7.3.210.0120.00616.49
7.3.200.0030.01219.39
7.3.190.0140.00916.45
7.3.180.0150.00316.47
7.3.170.0120.00616.32
7.3.160.0090.00816.53
7.3.120.0100.00714.75
7.3.110.0110.00814.47
7.3.100.0070.00714.82
7.3.90.0070.00315.05
7.3.80.0000.01614.81
7.3.70.0070.00314.53
7.3.60.0070.00314.79
7.3.50.0140.00014.43
7.3.40.0030.01014.80
7.3.30.0100.00314.61
7.3.20.0040.00716.61
7.3.10.0130.00816.30
7.3.00.0080.00816.25
7.2.330.0090.00916.36
7.2.320.0060.01016.67
7.2.310.0090.01316.32
7.2.300.0060.01316.71
7.2.290.0070.01016.53
7.2.250.0070.01314.79
7.2.240.0150.00714.75
7.2.230.0060.01014.98
7.2.220.0100.00314.90
7.2.210.0070.00714.82
7.2.200.0100.00315.09
7.2.190.0080.00315.12
7.2.180.0070.01014.94
7.2.170.0000.01314.70
7.2.160.0060.00915.09
7.2.150.0110.00716.60
7.2.140.0030.01016.83
7.2.130.0050.01116.70
7.2.120.0070.01016.77
7.2.110.0150.00716.50
7.2.100.0080.00816.73
7.2.90.0120.00716.73
7.2.80.0100.00616.66
7.2.70.0110.00516.66
7.2.60.0090.00616.53
7.2.50.0070.01016.77
7.2.40.0130.00516.72
7.2.30.0100.00616.57
7.2.20.0120.01116.38
7.2.10.0080.00916.46
7.2.00.0090.00817.64
7.1.330.0030.01315.64
7.1.320.0030.01015.53
7.1.310.0000.01415.45
7.1.300.0060.00915.74
7.1.290.0060.00615.68
7.1.280.0000.01115.61
7.1.270.0110.00015.62
7.1.260.0040.00415.43
7.1.250.0100.00515.27
7.1.200.0050.00515.67
7.1.70.0000.00917.19
7.1.60.0110.01419.21
7.1.50.0100.01316.58
7.1.00.0000.04022.57
7.0.200.0000.01516.74
7.0.140.0100.06721.96
7.0.60.0130.07320.00
7.0.50.0030.05717.85
7.0.40.0070.04020.25
7.0.30.0300.04720.07
7.0.20.0170.04320.08
7.0.10.0100.06720.15
7.0.00.0030.08320.21
5.6.280.0030.07321.16
5.6.210.0130.07320.63
5.6.200.0030.05318.14
5.6.190.0070.06020.55
5.6.180.0270.08320.77
5.6.170.0430.03720.71
5.6.160.0130.06020.48
5.6.150.0100.03318.14
5.6.140.0170.04018.18
5.6.130.0130.08018.14
5.6.120.0070.08321.11
5.6.110.0030.05721.00
5.6.100.0030.06721.09
5.6.90.0000.04320.95
5.6.80.0170.06020.38
5.5.350.0300.06320.36
5.5.340.0100.08018.08
5.5.330.0030.05020.21
5.5.320.0230.04320.35
5.5.310.0230.08320.27
5.5.300.0030.04318.04
5.5.290.0170.07317.97
5.5.280.0100.08020.91
5.5.270.0030.06720.84
5.5.260.0130.07020.67
5.5.250.0000.07720.79
5.5.240.0230.05720.17
5.4.450.0370.04319.41
5.4.440.0300.05019.19
5.4.430.0730.04719.50
5.4.420.0570.04319.46
5.4.410.0570.03319.28
5.4.400.0430.03019.32
5.4.390.0100.04719.11
5.4.380.0430.06018.70
5.4.370.0370.05018.70
5.4.360.0230.05318.54
5.4.350.0370.06018.72
5.4.340.0500.06718.48
5.4.320.0110.03712.51
5.4.310.0080.03812.51
5.4.300.0070.03712.52
5.4.290.0050.05212.51
5.4.280.0050.03912.40
5.4.270.0070.03712.41
5.4.260.0070.04712.40
5.4.250.0100.07318.73
5.4.240.0030.06718.73
5.4.230.0070.05718.94
5.4.220.0000.05718.62
5.4.210.0130.06718.97
5.4.200.0100.04718.93
5.4.190.0000.08018.89
5.4.180.0100.06318.88
5.4.170.0100.04718.95
5.4.160.0100.05018.61
5.4.150.0070.07018.73
5.4.140.0070.05316.48
5.4.130.0030.04716.41
5.4.120.0070.06016.36
5.4.110.0030.05316.45
5.4.100.0130.05716.46
5.4.90.0000.07716.41
5.4.80.0000.05316.60
5.4.70.0000.05316.39
5.4.60.0000.07716.36
5.4.50.0170.05716.43
5.4.40.0100.05316.38
5.4.30.0030.06716.41
5.4.20.0170.05716.45
5.4.10.0030.07016.39
5.4.00.0100.06015.96
5.3.290.0080.04512.80
5.3.280.0030.06314.60
5.3.270.0130.07014.77
5.3.260.0070.05714.61
5.3.250.0030.05314.79
5.3.240.0030.05314.68
5.3.230.0070.05014.46
5.3.220.0100.06014.75
5.3.210.0070.05714.56
5.3.200.0030.06314.45
5.3.190.0130.04714.57
5.3.180.0070.05314.57
5.3.170.0070.05714.56
5.3.160.0070.07014.56
5.3.150.0070.06014.54
5.3.140.0130.06314.54
5.3.130.0100.05314.53
5.3.120.0170.06314.64
5.3.110.0030.07314.63
5.3.100.0030.05714.04
5.3.90.0170.05713.87
5.3.80.0130.04314.15
5.3.70.0030.06714.11
5.3.60.0200.03713.99
5.3.50.0130.05014.04
5.3.40.0030.05313.79
5.3.30.0030.05713.99
5.3.20.0030.04713.80
5.3.10.0030.06713.52
5.3.00.0070.05713.66
5.2.170.0070.03711.23
5.2.160.0000.04011.32
5.2.150.0130.04011.27
5.2.140.0070.04011.22
5.2.130.0030.04311.19
5.2.120.0030.04011.18
5.2.110.0030.03711.09
5.2.100.0000.04311.06
5.2.90.0070.05011.13
5.2.80.0030.06011.26
5.2.70.0000.05311.20
5.2.60.0030.05311.08
5.2.50.0030.05710.98
5.2.40.0070.05710.99
5.2.30.0070.04010.96
5.2.20.0030.04010.98
5.2.10.0000.04310.70
5.2.00.0070.03710.82
5.1.60.0070.03010.24
5.1.50.0070.03010.24
5.1.40.0070.04010.24
5.1.30.0030.03310.41
5.1.20.0030.03710.43
5.1.10.0070.04010.24
5.1.00.0100.03310.24
5.0.50.0070.03010.24
5.0.40.0100.03310.24
5.0.30.0030.04010.24
5.0.20.0100.02010.24
5.0.10.0000.03310.24
5.0.00.0070.04710.24
4.4.90.0070.02010.24
4.4.80.0000.03310.24
4.4.70.0000.03010.24
4.4.60.0030.02310.24
4.4.50.0000.02310.24
4.4.40.0000.03310.24
4.4.30.0030.01710.24
4.4.20.0000.02310.24
4.4.10.0100.01310.24
4.4.00.0030.04310.24
4.3.110.0100.01310.24
4.3.100.0070.02310.24
4.3.90.0030.02010.24
4.3.80.0070.04010.24
4.3.70.0030.01710.24
4.3.60.0030.01710.24
4.3.50.0000.02710.24
4.3.40.0030.03010.24
4.3.30.0000.03010.24
4.3.20.0000.02310.24
4.3.10.0000.02710.24
4.3.00.0200.01314.48

preferences:
45.52 ms | 400 KiB | 5 Q