3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Doge { private $name; protected $whatever; public $yolo; public function __construct($name, $whatever = null) { $this->name = $name; $this->whatever = $whatever; } public function getName() { return $this->name; } public function getWhatever() { return $this->whatever; } public function equalsWithSameType(self $other) { if ($other->name === $this->name && $other->whatever === $this->whatever && $other->yolo === $this->yolo) { return true; } return false; } public function equalsWithSubType(DogeCoin $sub) { if ($sub->name === $this->name && $sub->whatever === $this->whatever && $sub->yolo === $this->yolo) { return true; } return false; } public function equalsWithRandomType(SomethingElseCompletely $whatever_man) { if ($whatever_man->name === $this->name && $whatever_man->whatever === $this->whatever && $whatever_man->yolo === $this->yolo) { return true; } return false; } } class DogeCoin extends Doge { private $name; } class SomethingElseCompletely { private $name; } $first_doge = new Doge('a'); $second_doge = new Doge('b'); $first_dogecoin = new DogeCoin('a'); $second_dogecoin = new DogeCoin('a'); $first_somethingelsecompletely = new SomethingElseCompletely('a'); $second_somethingelsecompletely = new SomethingElseCompletely('a'); // var_dump( // $first_doge, // $second_doge, // $first_dogecoin, // $second_dogecoin, // $first_somethingelsecompletely, // $second_somethingelsecompletely // ); var_dump($first_doge->equalsWithSameType($second_doge)); var_dump($first_doge->equalsWithSubType($first_dogecoin)); var_dump($first_doge->equalsWithRandomType($first_somethingelsecompletely));

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.43
8.3.50.0070.00922.11
8.3.40.0110.00418.79
8.3.30.0070.00720.30
8.3.20.0000.00820.39
8.3.10.0000.00822.14
8.3.00.0070.00022.58
8.2.180.0160.00316.50
8.2.170.0090.00622.96
8.2.160.0070.00722.26
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0060.01326.16
8.2.120.0040.00419.76
8.2.110.0030.00622.00
8.2.100.0080.00418.03
8.2.90.0040.00419.23
8.2.80.0030.00519.43
8.2.70.0030.00517.63
8.2.60.0000.00817.68
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0000.00717.97
8.2.20.0000.00717.76
8.2.10.0070.00017.75
8.2.00.0040.00717.67
8.1.280.0060.00925.92
8.1.270.0040.00424.66
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.75
8.1.230.0110.00018.97
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00517.13
8.1.190.0000.00817.54
8.1.180.0040.00419.13
8.1.170.0000.00818.44
8.1.160.0000.00822.19
8.1.150.0030.00518.69
8.1.140.0000.00717.50
8.1.130.0030.00617.78
8.1.120.0040.00317.50
8.1.110.0040.00417.35
8.1.100.0000.00917.49
8.1.90.0040.00417.52
8.1.80.0040.00417.36
8.1.70.0000.00717.39
8.1.60.0080.00017.61
8.1.50.0000.00717.60
8.1.40.0040.00417.52
8.1.30.0040.00417.50
8.1.20.0050.00317.60
8.1.10.0070.00017.64
8.1.00.0080.00417.53
8.0.300.0000.00718.77
8.0.290.0040.00417.05
8.0.280.0000.00818.49
8.0.270.0000.00717.16
8.0.260.0000.00716.92
8.0.250.0000.00716.93
8.0.240.0030.00617.02
8.0.230.0030.00317.05
8.0.220.0030.00316.98
8.0.210.0080.00017.04
8.0.200.0000.00616.95
8.0.190.0040.00417.05
8.0.180.0000.00717.04
8.0.170.0080.00016.91
8.0.160.0070.00017.02
8.0.150.0070.00016.97
8.0.140.0000.00716.91
8.0.130.0000.00613.39
8.0.120.0070.00016.99
8.0.110.0070.00016.99
8.0.100.0020.00517.05
8.0.90.0050.00217.06
8.0.80.0120.00317.06
8.0.70.0020.00516.98
8.0.60.0040.00416.83
8.0.50.0050.00317.01
8.0.30.0070.01117.25
8.0.20.0060.01217.40
8.0.10.0070.00017.14
8.0.00.0050.01816.80
7.4.330.0000.00615.00
7.4.320.0000.00716.46
7.4.300.0000.00716.53
7.4.290.0080.00016.63
7.4.280.0030.00316.65
7.4.270.0040.00416.57
7.4.260.0000.00813.34
7.4.250.0000.00816.61
7.4.240.0020.00516.62
7.4.230.0000.00716.67
7.4.220.0100.00716.68
7.4.210.0080.00916.59
7.4.200.0030.00316.44
7.4.190.0030.00316.50
7.4.160.0040.01416.51
7.4.150.0110.01117.40
7.4.140.0100.00717.86
7.4.130.0090.00716.57
7.4.120.0110.00616.54
7.4.110.0070.01116.40
7.4.100.0090.00916.82
7.4.90.0110.00716.52
7.4.80.0060.01219.39
7.4.70.0090.00916.61
7.4.60.0130.00316.55
7.4.50.0000.00816.56
7.4.40.0060.00922.77
7.4.30.0080.00816.50
7.4.10.0060.00915.11
7.4.00.0070.01114.99
7.3.330.0060.00013.24
7.3.320.0030.00613.24
7.3.310.0000.00816.22
7.3.300.0000.00716.38
7.3.290.0060.00916.31
7.3.280.0050.01116.37
7.3.270.0120.00617.40
7.3.260.0220.00816.36
7.3.250.0000.01916.44
7.3.240.0130.01116.36
7.3.230.0110.01116.50
7.3.210.0060.01116.43
7.3.200.0130.00619.39
7.3.190.0030.01716.56
7.3.180.0060.01516.41
7.3.170.0090.01316.46
7.3.160.0100.01316.55
7.3.130.0110.00714.71
7.3.120.0080.00914.90
7.3.110.0030.01614.91
7.3.100.0030.01314.63
7.3.90.0090.00614.64
7.3.80.0040.00714.91
7.3.70.0090.00614.98
7.3.60.0070.00714.95
7.3.50.0040.00414.93
7.3.40.0030.01014.43
7.3.30.0060.00614.91
7.3.20.0000.01416.43
7.3.10.0040.00816.82
7.3.00.0030.00716.57
7.2.330.0130.00616.77
7.2.320.0070.01116.60
7.2.310.0030.01316.79
7.2.300.0100.00716.84
7.2.290.0060.01016.52
7.2.260.0040.01115.17
7.2.250.0090.01015.32
7.2.240.0120.00314.93
7.2.230.0040.01215.04
7.2.220.0070.00715.09
7.2.210.0090.00614.90
7.2.200.0080.00615.32
7.2.190.0030.00715.05
7.2.180.0030.00715.07
7.2.170.0070.00414.99
7.2.160.0030.00715.18
7.2.150.0120.00017.04
7.2.140.0030.01117.10
7.2.130.0070.00717.02
7.2.120.0070.00417.04
7.2.110.0030.00717.00
7.2.100.0120.00017.07
7.2.90.0080.00817.18
7.2.80.0040.00716.75
7.2.70.0040.01117.02
7.2.60.0030.01016.92
7.2.50.0040.01116.55
7.2.40.0080.00416.96
7.2.30.0060.00916.80
7.2.20.0090.00617.04
7.2.10.0110.00716.86
7.2.00.0100.00218.02
7.1.330.0100.00315.60
7.1.320.0000.00915.76
7.1.310.0090.00615.91
7.1.300.0050.00515.82
7.1.290.0000.01215.72
7.1.280.0040.01115.44
7.1.270.0000.01015.61
7.1.260.0090.00615.93
7.1.250.0120.00315.62
7.1.240.0030.00515.76
7.1.230.0060.00715.97
7.1.220.0060.00615.87
7.1.210.0030.00715.63
7.1.200.0020.01315.55
7.1.190.0120.00015.93
7.1.180.0030.00615.87
7.1.170.0060.00615.83
7.1.160.0100.00315.84
7.1.150.0000.01515.74
7.1.140.0030.01015.84
7.1.130.0070.01015.46
7.1.120.0110.00315.80
7.1.110.0090.00615.94
7.1.100.0060.00916.96
7.1.90.0040.00815.96
7.1.80.0030.01016.04
7.1.70.0020.00616.48
7.1.60.0050.01417.49
7.1.50.0050.00616.23
7.1.40.0090.00015.57
7.1.30.0030.00915.63
7.1.20.0080.00315.81
7.1.10.0040.01115.74
7.1.00.0050.02319.01
7.0.330.0090.00315.56
7.0.320.0080.00615.20
7.0.310.0040.01115.46
7.0.300.0040.00815.56
7.0.290.0060.00615.23
7.0.280.0070.01115.45
7.0.270.0000.01015.43
7.0.260.0100.00315.46
7.0.250.0000.01415.41
7.0.240.0090.00615.64
7.0.230.0040.01115.58
7.0.220.0030.00515.49
7.0.210.0040.01115.23
7.0.200.0060.00516.11
7.0.190.0130.00015.32
7.0.180.0060.00615.38
7.0.170.0040.00415.43
7.0.160.0030.00815.44
7.0.150.0000.01215.35
7.0.140.0030.04018.87
7.0.130.0090.00015.55
7.0.120.0000.01215.32
7.0.110.0000.01415.29
7.0.100.0000.01015.25
7.0.90.0060.00615.32
7.0.80.0120.00315.49
7.0.70.0080.00415.29
7.0.60.0060.03017.54
7.0.50.0030.03016.64
7.0.40.0060.02716.92
7.0.30.0170.04016.91
7.0.20.0170.04216.84
7.0.10.0120.02916.88
7.0.00.0040.03016.82
5.6.400.0030.01314.42
5.6.390.0060.00914.30
5.6.380.0060.00814.53
5.6.370.0040.00814.51
5.6.360.0030.01014.46
5.6.350.0030.01013.91
5.6.340.0060.01214.68
5.6.330.0040.00714.03
5.6.320.0060.00314.39
5.6.310.0040.00714.53
5.6.300.0030.00714.57
5.6.290.0060.00614.61
5.6.280.0020.04517.65
5.6.270.0000.01214.54
5.6.260.0040.00814.26
5.6.250.0070.00314.65
5.6.240.0030.01014.25
5.6.230.0060.00614.36
5.6.220.0080.00814.23
5.6.210.0080.02317.57
5.6.200.0030.04416.38
5.6.190.0060.04317.57
5.6.180.0180.04117.48
5.6.170.0190.02717.36
5.6.160.0060.04517.54
5.6.150.0130.03616.33
5.6.140.0070.04016.22
5.6.130.0030.02416.22
5.6.120.0090.03717.79
5.6.110.0100.04017.84
5.6.100.0070.02317.66
5.6.90.0080.04517.74
5.6.80.0080.04217.27
5.6.70.0190.03817.50
5.6.60.0030.00914.40
5.6.50.0070.00714.39
5.6.40.0090.00614.23
5.6.30.0020.01314.27
5.6.20.0040.01114.54
5.6.10.0070.00714.29
5.6.00.0070.00414.61
5.5.380.0070.00714.38
5.5.370.0060.00614.30
5.5.360.0050.00314.44
5.5.350.0020.04717.25
5.5.340.0050.02516.33
5.5.330.0050.04517.29
5.5.320.0160.04017.53
5.5.310.0190.04217.19
5.5.300.0100.02716.07
5.5.290.0020.02616.13
5.5.280.0100.04317.32
5.5.270.0080.04717.56
5.5.260.0030.02517.45
5.5.250.0070.04217.53
5.5.240.0060.02817.32
5.5.230.0090.00014.38
5.5.220.0000.01113.92
5.5.210.0080.00813.94
5.5.200.0150.00014.15
5.5.190.0030.00713.96
5.5.180.0040.00814.36
5.5.170.0120.00414.33
5.5.160.0070.00714.07
5.5.150.0070.01014.42
5.5.140.0040.01214.40
5.5.130.0090.00014.23
5.5.120.0040.01114.29
5.5.110.0040.00814.16
5.5.100.0090.00613.90
5.5.90.0060.00614.22
5.5.80.0000.01214.06
5.5.70.0080.00814.41
5.5.60.0120.00314.27
5.5.50.0090.00714.29
5.5.40.0070.01014.37
5.5.30.0040.01114.31
5.5.20.0040.01114.42
5.5.10.0060.00914.17
5.5.00.0030.01014.35
5.4.450.0930.02715.20
5.4.440.0960.02515.24
5.4.430.1000.02015.37
5.4.420.1000.02415.26
5.4.410.0930.02315.18
5.4.400.0950.02515.13
5.4.390.0930.02314.99
5.4.380.0820.03315.12
5.4.370.0930.02315.07
5.4.360.0980.02715.15
5.4.350.0900.02515.02
5.4.340.0900.02714.87
5.4.330.0000.01210.93
5.4.320.0860.02415.03
5.4.310.0870.01914.99
5.4.300.0980.02515.05
5.4.290.0870.02614.85
5.4.280.0020.04415.06
5.4.270.0080.03014.81
5.4.260.0050.03915.13
5.4.250.0420.02514.95
5.4.240.0890.02415.02
5.4.230.0980.02514.76
5.4.220.0860.02615.15
5.4.210.0980.02615.15
5.4.200.0930.03214.89
5.4.190.0980.02714.99
5.4.180.1000.02515.18
5.4.170.0870.02015.22
5.4.160.0850.02115.00
5.4.150.0680.02514.84
5.4.140.0080.02013.56
5.4.130.0050.02113.86
5.4.120.0650.02013.83
5.4.110.1010.02313.74
5.4.100.1060.02113.59
5.4.90.0950.02213.51
5.4.80.0870.02213.80
5.4.70.0920.02213.79
5.4.60.0870.01813.74
5.4.50.0850.02313.72
5.4.40.0880.02113.59
5.4.30.0910.02113.70
5.4.20.0870.02013.61
5.4.10.0990.02713.72
5.4.00.1090.01613.29
5.3.290.0970.02112.77
5.3.280.1000.02612.39
5.3.270.1000.02412.70
5.3.260.0960.02412.55
5.3.250.0970.02512.64
5.3.240.0970.03212.57
5.3.230.0970.02412.43
5.3.220.0970.02012.59
5.3.210.0850.02112.57
5.3.200.0780.02712.60
5.3.190.0880.02212.64
5.3.180.0920.02712.50
5.3.170.0770.02412.45
5.3.160.0830.02412.68
5.3.150.0800.02112.68
5.3.140.0850.02012.59
5.3.130.0950.02612.73
5.3.120.0850.02512.59
5.3.110.0960.02512.66
5.3.100.0850.02212.35
5.3.90.0890.01712.25
5.3.80.0710.01812.17
5.3.70.0420.02912.37
5.3.60.0030.02312.24
5.3.50.0030.02112.28
5.3.40.0680.01712.19
5.3.30.0900.02712.31
5.3.20.0780.02012.14
5.3.10.0980.02012.08
5.3.00.0810.01812.07
5.2.170.1400.02711.22
5.2.160.1370.02711.14
5.2.150.1230.03011.29
5.2.140.1330.03011.14
5.2.130.1200.03011.13
5.2.120.1230.02311.05
5.2.110.1400.04011.36
5.2.100.1570.03011.13
5.2.90.0000.04311.21
5.2.80.0030.02711.06
5.2.70.0100.02711.04
5.2.60.0000.03010.98
5.2.50.1100.03011.02
5.2.40.1100.03710.93
5.2.30.1000.03311.07
5.2.20.1100.03010.93
5.2.10.1070.03010.96
5.2.00.0930.02010.81
5.1.60.0030.03010.26
5.1.50.0000.0309.92
5.1.40.0000.02710.08
5.1.30.0200.02310.50
5.1.20.0930.02310.34
5.1.10.0930.02710.07
5.1.00.0900.0239.98
5.0.50.0570.0208.56
5.0.40.0570.0178.49
5.0.30.0570.0338.24
5.0.20.0630.0138.24
5.0.10.0570.0208.20
5.0.00.0600.0308.28
4.4.90.0370.0177.70
4.4.80.0600.0137.70
4.4.70.0530.0137.70
4.4.60.0530.0177.70
4.4.50.0070.0177.70
4.4.40.0600.0237.70
4.4.30.0670.0207.70
4.4.20.0630.0177.70
4.4.10.0570.0137.70
4.4.00.0600.0307.70
4.3.110.0670.0177.70
4.3.100.0630.0177.70
4.3.90.0770.0177.70
4.3.80.0570.0237.70
4.3.70.0530.0177.70
4.3.60.0570.0137.70
4.3.50.0570.0137.70
4.3.40.0630.0277.70
4.3.30.0270.0177.70
4.3.20.0300.0137.70
4.3.10.0270.0177.70
4.3.00.0300.0137.70

preferences:
43.8 ms | 401 KiB | 5 Q