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('a'); $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), $first_doge->equalsWithSubType($first_dogecoin), $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.0110.00418.39
8.3.50.0090.01121.97
8.3.40.0150.00018.82
8.3.30.0140.00020.30
8.3.20.0040.00420.20
8.3.10.0040.00421.97
8.3.00.0030.00622.44
8.2.180.0110.00416.50
8.2.170.0070.00722.96
8.2.160.0070.00722.26
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0150.00326.16
8.2.120.0040.00419.77
8.2.110.0060.00322.08
8.2.100.0080.00417.97
8.2.90.0040.00419.05
8.2.80.0090.00019.28
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0040.00418.03
8.2.30.0040.00418.09
8.2.20.0040.00417.70
8.2.10.0040.00417.70
8.2.00.0030.00917.64
8.1.280.0180.00025.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.91
8.1.230.0040.00718.97
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0040.00417.55
8.1.180.0030.00519.14
8.1.170.0060.00318.61
8.1.160.0040.00422.13
8.1.150.0040.00418.59
8.1.140.0000.00817.57
8.1.130.0000.00717.88
8.1.120.0000.00817.41
8.1.110.0040.00417.49
8.1.100.0000.00817.49
8.1.90.0000.00717.54
8.1.80.0040.00417.55
8.1.70.0070.00017.48
8.1.60.0030.00617.51
8.1.50.0030.00617.54
8.1.40.0000.00817.55
8.1.30.0030.00617.50
8.1.20.0080.00017.72
8.1.10.0030.00617.58
8.1.00.0060.00617.39
8.0.300.0070.00018.77
8.0.290.0040.00417.30
8.0.280.0070.00018.42
8.0.270.0000.00717.22
8.0.260.0040.00416.93
8.0.250.0030.00317.07
8.0.240.0030.00517.09
8.0.230.0030.00517.07
8.0.220.0000.00717.01
8.0.210.0030.00516.88
8.0.200.0070.00017.07
8.0.190.0040.00416.96
8.0.180.0000.00716.98
8.0.170.0000.00817.00
8.0.160.0040.00416.91
8.0.150.0050.00216.99
8.0.140.0070.00016.97
8.0.130.0030.00313.43
8.0.120.0000.00716.94
8.0.110.0040.00416.98
8.0.100.0000.00716.86
8.0.90.0050.00317.10
8.0.80.0120.00316.95
8.0.70.0040.00417.00
8.0.60.0040.00416.88
8.0.50.0080.00017.02
8.0.30.0070.01417.17
8.0.20.0100.00817.40
8.0.10.0080.00017.00
8.0.00.0140.00816.92
7.4.330.0070.00015.00
7.4.320.0000.00616.57
7.4.300.0000.00716.46
7.4.290.0030.00316.54
7.4.280.0000.00716.44
7.4.270.0040.00416.50
7.4.260.0040.00413.43
7.4.250.0030.00516.50
7.4.240.0000.00716.59
7.4.230.0030.00316.45
7.4.220.0060.01216.66
7.4.210.0090.00916.57
7.4.200.0000.00716.64
7.4.190.0030.00316.51
7.4.160.0060.01116.64
7.4.150.0100.01017.40
7.4.140.0130.00517.86
7.4.130.0100.00816.53
7.4.120.0110.00716.71
7.4.110.0070.01116.48
7.4.100.0110.00616.48
7.4.90.0130.00616.63
7.4.80.0060.01119.39
7.4.70.0120.00916.55
7.4.60.0030.01616.42
7.4.50.0030.00516.60
7.4.40.0070.00722.77
7.4.30.0240.01816.50
7.4.00.0030.00614.73
7.3.330.0030.00313.41
7.3.320.0030.00313.38
7.3.310.0040.00416.27
7.3.300.0000.00716.38
7.3.290.0060.00916.37
7.3.280.0070.00816.38
7.3.270.0070.01117.40
7.3.260.0130.01016.59
7.3.250.0070.01216.46
7.3.240.0130.00616.34
7.3.230.0140.00716.39
7.3.210.0120.00616.46
7.3.200.0090.00819.39
7.3.190.0100.01316.37
7.3.180.0130.01316.37
7.3.170.0000.01716.63
7.3.160.0140.00416.43
7.3.120.0070.01014.77
7.2.330.0300.02716.80
7.2.320.0140.01016.76
7.2.310.0040.01316.60
7.2.300.0110.00716.74
7.2.290.0000.02116.39
7.2.60.0060.00916.92
7.2.00.0060.01219.54
7.1.200.0110.00415.91
7.1.70.0000.01016.85
7.1.60.0070.01016.95
7.1.50.0090.00317.02
7.1.00.0000.03722.28
7.0.200.0100.00316.89
7.0.140.0030.07322.11
7.0.70.4930.04719.99
7.0.60.0130.06719.90
7.0.50.0170.07017.98
7.0.40.0230.07020.08
7.0.30.0230.05720.03
7.0.20.0300.08320.19
7.0.10.0300.06720.11
7.0.00.0030.05020.22
5.6.280.0070.07021.00
5.6.210.0170.06020.76
5.6.200.0070.08318.16
5.6.190.0170.06720.51
5.6.180.0200.07320.43
5.6.170.0230.08020.46
5.6.160.0100.07320.52
5.6.150.0100.08018.18
5.6.140.0100.07718.24
5.6.130.0000.07318.23
5.6.120.0100.08021.13
5.6.110.0070.08021.04
5.6.100.0130.08021.15
5.6.90.0100.04721.07
5.6.80.0000.04320.45
5.6.70.0070.08020.29
5.5.350.0030.07320.32
5.5.340.0030.04317.98
5.5.330.0070.04020.27
5.5.320.0070.08020.47
5.5.310.0300.07020.41
5.5.300.0030.07718.09
5.5.290.0230.07017.96
5.5.280.0130.07320.81
5.5.270.0030.04020.80
5.5.260.0070.08020.86
5.5.250.0130.06020.80
5.5.240.0070.07720.20
5.4.450.0070.08319.18
5.4.440.0030.08719.42
5.4.430.0130.06019.17
5.4.420.0070.07719.41
5.4.410.0070.04719.45
5.4.400.0070.04719.24
5.4.390.0030.04719.20
5.4.380.0070.04319.08
5.4.370.0130.05019.14
5.4.360.0030.04019.22
5.4.350.0000.05019.09
5.4.340.0000.04018.85
5.4.320.0030.04018.86
5.4.310.0000.08018.95
5.4.300.0070.07319.09
5.4.290.0030.07018.96
5.4.280.0000.06319.24
5.4.270.0030.07319.13
5.4.260.0030.04718.96
5.4.250.0130.06719.14
5.4.240.0070.06719.14
5.4.230.0000.06719.21
5.4.220.0000.05018.94
5.4.210.0030.07318.93
5.4.200.0000.05018.86
5.4.190.0030.05719.07
5.4.180.0100.03319.13
5.4.170.0000.07719.14
5.4.160.0070.07019.12
5.4.150.0070.05019.20
5.4.140.0130.06016.38
5.4.130.0030.07016.56
5.4.120.0100.03316.56
5.4.110.0030.05016.41
5.4.100.0100.04316.50
5.4.90.0030.07316.60
5.4.80.0000.04716.23
5.4.70.0070.05716.38
5.4.60.0030.04016.45
5.4.50.0000.07316.49
5.4.40.0100.04016.57
5.4.30.0030.05016.50
5.4.20.0000.06716.33
5.4.10.0070.04316.52
5.4.00.0030.06315.74
5.3.290.0000.05714.70
5.3.280.0030.04714.60
5.3.270.0100.04714.54
5.3.260.0070.08014.78
5.3.250.0070.07014.70
5.3.240.0070.07014.54
5.3.230.0030.06314.63
5.3.220.0030.07714.55
5.3.210.0070.05714.48
5.3.200.0030.04714.66
5.3.190.0070.07014.50
5.3.180.0100.04014.70
5.3.170.0000.04714.66
5.3.160.0130.03314.66
5.3.150.0030.04014.48
5.3.140.0030.07314.49
5.3.130.0100.06014.68
5.3.120.0000.08314.79
5.3.110.0000.04714.48
5.3.100.0000.05313.96
5.3.90.0070.04013.96
5.3.80.0030.03714.04
5.3.70.0070.04713.95
5.3.60.0000.04713.99
5.3.50.0070.06714.19
5.3.40.0000.06014.05
5.3.30.0030.07313.83
5.3.20.0000.05313.88
5.3.10.0070.06713.60
5.3.00.0000.05013.77
5.2.170.0030.05312.39
5.2.160.0070.05012.39
5.2.150.0000.06012.39
5.2.140.0030.05312.39
5.2.130.0070.03712.39
5.2.120.0000.04312.39
5.2.110.0000.04012.39
5.2.100.0000.03712.39
5.2.90.0230.02012.39
5.2.80.0200.02712.39
5.2.70.0000.04012.39
5.2.60.0000.04312.39
5.2.50.0030.04312.39
5.2.40.0200.02712.39
5.2.30.0070.06312.39
5.2.20.0100.03012.39
5.2.10.0030.03712.39
5.2.00.0030.03312.39
5.1.60.0030.05312.39
5.1.50.0030.04012.39
5.1.40.0070.04712.39
5.1.30.0000.03312.39
5.1.20.0000.05712.39
5.1.10.0030.04712.39
5.1.00.0000.03712.39
5.0.50.0030.04312.39
5.0.40.0030.03712.39
5.0.30.0100.05712.39
5.0.20.0070.04012.39
5.0.10.0030.04012.39
5.0.00.0030.06312.39
4.4.90.0030.01312.39
4.4.80.0070.02012.39
4.4.70.0000.03712.39
4.4.60.0030.03012.39
4.4.50.0000.02012.39
4.4.40.0030.03012.39
4.4.30.0000.03712.39
4.4.20.0030.01712.39
4.4.10.0000.02312.39
4.4.00.0000.03712.39
4.3.110.0030.03712.39
4.3.100.0030.02312.39
4.3.90.0000.02712.39
4.3.80.0030.05012.39
4.3.70.0000.03712.39
4.3.60.0000.02712.39
4.3.50.0000.02012.39
4.3.40.0000.04712.39
4.3.30.0000.03712.39
4.3.20.0000.03012.39
4.3.10.0000.03012.39
4.3.00.0000.03012.39

preferences:
38.25 ms | 401 KiB | 5 Q