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.66
8.3.50.0080.01021.91
8.3.40.0070.01118.93
8.3.30.0090.00620.34
8.3.20.0050.00320.30
8.3.10.0040.00421.96
8.3.00.0090.00022.64
8.2.180.0110.00716.75
8.2.170.0000.01422.96
8.2.160.0100.00322.21
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0140.00426.16
8.2.120.0080.00019.83
8.2.110.0060.00319.27
8.2.100.0080.00417.78
8.2.90.0050.00319.17
8.2.80.0040.00419.39
8.2.70.0030.00617.63
8.2.60.0000.00818.03
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0040.00417.98
8.2.20.0000.00717.75
8.2.10.0040.00417.85
8.2.00.0040.00717.86
8.1.280.0000.01725.92
8.1.270.0000.00724.66
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00321.00
8.1.230.0000.01119.16
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0070.00317.11
8.1.190.0080.00017.53
8.1.180.0090.00019.13
8.1.170.0060.00318.63
8.1.160.0000.00722.19
8.1.150.0030.00518.68
8.1.140.0000.00717.43
8.1.130.0000.00717.86
8.1.120.0040.00417.54
8.1.110.0050.00217.46
8.1.100.0000.00817.50
8.1.90.0000.00817.48
8.1.80.0030.00317.39
8.1.70.0020.00517.46
8.1.60.0090.00017.50
8.1.50.0040.00417.59
8.1.40.0060.00317.54
8.1.30.0060.00317.61
8.1.20.0000.00817.53
8.1.10.0000.00817.62
8.1.00.0040.00417.51
8.0.300.0000.00718.77
8.0.290.0070.00017.16
8.0.280.0050.00218.54
8.0.270.0030.00317.21
8.0.260.0030.00516.91
8.0.250.0070.00017.03
8.0.240.0060.00316.99
8.0.230.0030.00316.92
8.0.220.0000.00716.88
8.0.210.0000.00716.93
8.0.200.0060.00017.12
8.0.190.0040.00416.95
8.0.180.0030.00517.02
8.0.170.0080.00017.05
8.0.160.0000.00816.86
8.0.150.0000.00816.80
8.0.140.0000.00716.95
8.0.130.0060.00013.45
8.0.120.0050.00216.85
8.0.110.0040.00416.91
8.0.100.0040.00417.00
8.0.90.0040.00417.04
8.0.80.0060.00917.05
8.0.70.0070.00016.98
8.0.60.0000.00816.98
8.0.50.0080.00016.86
8.0.30.0180.00017.21
8.0.20.0160.00417.40
8.0.10.0070.00017.21
8.0.00.0100.00916.80
7.4.330.0040.00415.00
7.4.320.0070.00016.64
7.4.300.0000.00716.66
7.4.290.0070.00016.64
7.4.280.0030.00316.61
7.4.270.0030.00616.63
7.4.260.0090.00013.34
7.4.250.0000.00716.61
7.4.240.0060.00216.56
7.4.230.0070.00016.52
7.4.220.0090.01016.60
7.4.210.0070.00916.55
7.4.200.0000.00716.75
7.4.190.0030.00316.35
7.4.160.0030.01616.42
7.4.150.0150.00717.40
7.4.140.0090.00917.86
7.4.130.0100.00716.56
7.4.120.0080.00816.55
7.4.110.0000.01716.64
7.4.100.0080.00816.54
7.4.90.0070.01016.50
7.4.80.0060.01219.39
7.4.70.0100.00716.66
7.4.60.0040.01316.68
7.4.50.0040.00416.41
7.4.40.0070.00722.77
7.4.30.0130.00816.50
7.4.00.0060.00914.78
7.3.330.0000.00613.38
7.3.320.0000.00613.40
7.3.310.0030.00316.23
7.3.300.0000.00716.39
7.3.290.0060.00916.39
7.3.280.0050.01116.34
7.3.270.0030.01417.40
7.3.260.0130.00716.52
7.3.250.0140.00316.43
7.3.240.0030.01416.45
7.3.230.0030.01416.40
7.3.210.0080.00816.49
7.3.200.0000.01819.39
7.3.190.0110.01116.43
7.3.180.0100.00716.50
7.3.170.0100.01016.51
7.3.160.0090.01216.45
7.3.120.0120.00314.82
7.3.10.0020.00916.58
7.3.00.0070.00416.47
7.2.330.0030.01516.89
7.2.320.0070.01016.58
7.2.310.0100.00616.78
7.2.300.0150.00316.68
7.2.290.0060.00916.74
7.2.130.0040.00716.90
7.2.120.0100.00316.92
7.2.110.0050.00916.97
7.2.100.0050.00516.93
7.2.90.0050.00717.07
7.2.80.0050.00617.09
7.2.70.0050.00717.05
7.2.60.0060.00816.99
7.2.50.0090.00316.97
7.2.40.0090.00516.98
7.2.30.0050.01017.04
7.2.20.0050.00516.95
7.2.10.0030.01016.79
7.2.00.0050.00817.71
7.1.250.0020.00815.75
7.1.200.0070.00315.97
7.1.100.0040.00817.91
7.1.70.0030.00317.26
7.1.60.0100.01419.43
7.1.50.0070.01116.79
7.1.00.0000.03722.46
7.0.200.0030.00716.85
7.0.140.0030.07322.09
7.0.60.0100.08720.03
7.0.50.0030.04317.72
7.0.40.0100.04020.13
7.0.30.0430.04020.13
7.0.20.0300.07020.25
7.0.10.0070.08320.09
7.0.00.0130.08020.30
5.6.280.0070.07021.05
5.6.210.0070.04020.71
5.6.200.0000.05318.18
5.6.190.0130.07720.61
5.6.180.0230.05320.77
5.6.170.0270.05320.46
5.6.160.0100.06320.46
5.6.150.0000.04718.18
5.6.140.0070.04718.28
5.6.130.0130.05718.23
5.6.120.0030.08321.11
5.6.110.0070.08021.03
5.6.100.0170.07021.00
5.6.90.0030.08321.14
5.6.80.0070.07020.39
5.6.70.4500.04020.54
5.5.350.0100.05720.45
5.5.340.0070.07317.98
5.5.330.0000.09020.43
5.5.320.0170.06020.38
5.5.310.0300.07720.34
5.5.300.0100.06018.00
5.5.290.0000.08318.09
5.5.280.0030.04320.89
5.5.270.0130.07320.78
5.5.260.0100.07320.77
5.5.250.0030.04020.60
5.5.240.0000.08020.18
5.4.450.0900.04319.48
5.4.440.0830.06019.70
5.4.430.0830.07319.33
5.4.420.0930.06719.45
5.4.410.0830.06319.45
5.4.400.1100.06318.84
5.4.390.1400.07718.75
5.4.380.0330.04018.79
5.4.370.0100.05718.57
5.4.360.0200.05318.74
5.4.350.0130.04412.04
5.4.340.0090.03912.03
5.4.320.0040.04012.52
5.4.310.0050.04012.52
5.4.300.0090.04312.52
5.4.290.0050.04212.51
5.4.280.0050.04112.41
5.4.270.0090.03512.41
5.4.260.0040.04712.41
5.4.250.0050.04412.41
5.4.240.0170.04318.93
5.4.230.0100.05018.93
5.4.220.0100.07719.01
5.4.210.0030.05318.74
5.4.200.0130.04718.84
5.4.190.0100.04718.94
5.4.180.0130.04718.77
5.4.170.0230.06318.73
5.4.160.0070.05318.94
5.4.150.0230.03718.94
5.4.140.0070.05316.48
5.4.130.0100.05316.45
5.4.120.0130.04316.56
5.4.110.0070.05016.49
5.4.100.0100.04316.70
5.4.90.0070.06716.60
5.4.80.0130.04016.58
5.4.70.0100.04316.46
5.4.60.0030.05316.59
5.4.50.0070.06716.39
5.4.40.0070.04716.46
5.4.30.0100.04316.51
5.4.20.0070.04716.43
5.4.10.0030.06716.35
5.4.00.0030.06015.81
5.3.290.0050.04612.80
5.3.280.0000.05714.83
5.3.270.0100.04714.53
5.3.260.0170.04314.45
5.3.250.0070.04714.70
5.3.240.0070.04714.45
5.3.230.0070.05314.84
5.3.220.0070.05314.67
5.3.210.0070.05314.65
5.3.200.0130.04314.51
5.3.190.0070.05014.43
5.3.180.0070.04714.48
5.3.170.0000.05714.78
5.3.160.0170.04314.66
5.3.150.0100.05714.74
5.3.140.0070.04714.54
5.3.130.0100.05714.57
5.3.120.0030.06714.65
5.3.110.0130.05714.56
5.3.100.0070.06314.04
5.3.90.0030.05714.20
5.3.80.0070.04714.11
5.3.70.0030.05314.25
5.3.60.0070.05013.91
5.3.50.0070.06313.87
5.3.40.0030.05013.98
5.3.30.0000.05713.83
5.3.20.0030.05013.78
5.3.10.0100.04313.75
5.3.00.0100.04713.74
5.2.170.0030.04711.07
5.2.160.0070.03711.15
5.2.150.0100.03711.24
5.2.140.0070.03711.32
5.2.130.0070.03710.95
5.2.120.0000.04311.21
5.2.110.0070.03711.08
5.2.100.0000.04711.20
5.2.90.0070.04010.95
5.2.80.0030.04011.18
5.2.70.0070.05711.09
5.2.60.0200.02711.13
5.2.50.0170.04311.11
5.2.40.0000.04010.98
5.2.30.0030.04011.21
5.2.20.0030.04011.06
5.2.10.0100.03310.88
5.2.00.0070.03710.80
5.1.60.0130.02310.17
5.1.50.0070.03710.08
5.1.40.0070.03010.20
5.1.30.0100.03010.43
5.1.20.0000.04010.20
5.1.10.0000.03710.15
5.1.00.0030.03710.20
5.0.50.0000.0338.82
5.0.40.0070.0208.36
5.0.30.0070.0378.17
5.0.20.0070.0238.29
5.0.10.0000.0308.16
5.0.00.0000.0438.16
4.4.90.0000.0206.63
4.4.80.0030.0206.63
4.4.70.0030.0206.63
4.4.60.0030.0276.63
4.4.50.0000.0206.63
4.4.40.0030.0376.63
4.4.30.0030.0306.63
4.4.20.0000.0236.63
4.4.10.0070.0176.63
4.4.00.0030.0336.63
4.3.110.0070.0176.61
4.3.100.0000.0206.56
4.3.90.0000.0206.56
4.3.80.0030.0336.62
4.3.70.0030.0176.62
4.3.60.0000.0206.62
4.3.50.0030.0206.62
4.3.40.0030.0306.62
4.3.30.0000.0306.62
4.3.20.0000.0236.62
4.3.10.0000.0276.62
4.3.00.0100.0237.09

preferences:
40.43 ms | 401 KiB | 5 Q