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)); 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.0060.01318.80
8.3.50.0150.00521.90
8.3.40.0090.00619.09
8.3.30.0070.00720.17
8.3.20.0040.00420.20
8.3.10.0030.00521.97
8.3.00.0060.00322.39
8.2.180.0120.00316.50
8.2.170.0110.00322.96
8.2.160.0030.01022.15
8.2.150.0130.00724.18
8.2.140.0080.00024.66
8.2.130.0060.01326.16
8.2.120.0000.00819.77
8.2.110.0050.00322.29
8.2.100.0080.00417.91
8.2.90.0000.00819.40
8.2.80.0000.00819.31
8.2.70.0040.00417.49
8.2.60.0040.00418.03
8.2.50.0080.00018.07
8.2.40.0000.00818.09
8.2.30.0040.00418.16
8.2.20.0000.00717.70
8.2.10.0080.00017.81
8.2.00.0060.00317.89
8.1.280.0110.00425.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00021.94
8.1.230.0070.00419.22
8.1.220.0030.00617.74
8.1.210.0050.00518.77
8.1.200.0060.00317.23
8.1.190.0040.00417.53
8.1.180.0040.00418.88
8.1.170.0050.00318.47
8.1.160.0080.00022.05
8.1.150.0040.00418.68
8.1.140.0070.00017.45
8.1.130.0040.00417.91
8.1.120.0040.00417.54
8.1.110.0060.00317.48
8.1.100.0000.00817.54
8.1.90.0040.00417.38
8.1.80.0040.00417.47
8.1.70.0030.00317.47
8.1.60.0040.00417.50
8.1.50.0000.00817.57
8.1.40.0060.00317.47
8.1.30.0030.00617.66
8.1.20.0040.00417.69
8.1.10.0050.00217.65
8.1.00.0030.00717.56
8.0.300.0070.00018.77
8.0.290.0000.00817.28
8.0.280.0040.00418.54
8.0.270.0040.00417.25
8.0.260.0040.00416.92
8.0.250.0040.00416.96
8.0.240.0000.00816.96
8.0.230.0000.00717.06
8.0.220.0030.00317.01
8.0.210.0000.00716.96
8.0.200.0030.00316.92
8.0.190.0050.00317.04
8.0.180.0040.00417.06
8.0.170.0050.00316.90
8.0.160.0000.00816.87
8.0.150.0000.00817.00
8.0.140.0000.00716.95
8.0.130.0000.00513.36
8.0.120.0030.00516.91
8.0.110.0030.00516.97
8.0.100.0040.00416.99
8.0.90.0080.00017.05
8.0.80.0040.01216.88
8.0.70.0000.00816.84
8.0.60.0040.00416.88
8.0.50.0030.00516.91
8.0.30.0060.01217.24
8.0.20.0120.00817.40
8.0.10.0030.00516.93
8.0.00.0100.01416.76
7.4.330.0080.00015.00
7.4.320.0060.00016.68
7.4.300.0000.00716.55
7.4.290.0000.00716.63
7.4.280.0000.00816.58
7.4.270.0040.00416.60
7.4.260.0000.00713.32
7.4.250.0040.00416.59
7.4.240.0000.00716.59
7.4.230.0000.00716.64
7.4.220.0090.01616.59
7.4.210.0090.00816.61
7.4.200.0030.00316.62
7.4.190.0030.00316.44
7.4.160.0110.00516.64
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0070.01016.50
7.4.120.0100.00716.69
7.4.110.0100.00716.61
7.4.100.0120.00616.64
7.4.90.0180.00016.60
7.4.80.0100.00719.39
7.4.70.0100.01016.43
7.4.60.0060.01616.57
7.4.50.0050.00316.57
7.4.40.0030.01322.77
7.4.30.0080.00916.34
7.4.00.0120.00414.74
7.3.330.0030.00313.45
7.3.320.0000.00813.38
7.3.310.0030.00316.41
7.3.300.0030.00316.37
7.3.290.0150.00616.37
7.3.280.0080.00916.37
7.3.270.0060.01217.40
7.3.260.0090.01316.39
7.3.250.0110.00616.48
7.3.240.0120.00916.40
7.3.230.0110.01016.49
7.3.210.0080.00916.33
7.3.200.0130.00319.39
7.3.190.0120.00916.49
7.3.180.0000.01716.60
7.3.170.0060.01016.55
7.3.160.0160.00716.51
7.3.120.0000.01714.81
7.2.330.0140.01016.50
7.2.320.0160.00016.50
7.2.310.0100.00716.69
7.2.300.0110.00716.65
7.2.290.0060.01116.67
7.2.60.0030.01016.85
7.2.00.0000.01219.45
7.1.200.0170.00315.82
7.1.100.0030.01418.49
7.1.70.0060.00317.09
7.1.60.0110.01419.43
7.1.50.0000.01116.80
7.1.00.0030.06022.44
7.0.200.0040.00416.53
7.0.140.0000.07722.10
7.0.60.0170.06019.84
7.0.50.0000.09017.88
7.0.40.0170.07320.13
7.0.30.0370.07020.16
7.0.20.0230.05020.23
7.0.10.0170.04320.30
7.0.00.0000.04720.07
5.6.210.0030.04020.49
5.6.200.0070.07718.20
5.6.190.0100.05020.42
5.6.180.0300.06720.46
5.6.170.0200.04320.53
5.6.160.0030.08020.43
5.6.150.0130.07318.12
5.6.140.0130.07318.18
5.6.130.0130.03018.13
5.6.120.0070.08320.91
5.6.110.0000.04720.90
5.6.100.0130.07321.10
5.6.90.0070.08321.11
5.6.80.0070.06320.55
5.6.70.0400.06320.48
5.5.350.0030.08320.42
5.5.340.0070.08018.09
5.5.330.0070.07320.34
5.5.320.0230.04320.20
5.5.310.0300.07320.51
5.5.300.0070.04317.98
5.5.290.0070.03717.95
5.5.280.0070.05320.89
5.5.270.0100.04020.88
5.5.260.0000.05020.88
5.5.250.0100.07020.73
5.5.240.0130.07320.20
5.4.450.0700.06719.48
5.4.440.0730.06719.64
5.4.430.0130.06719.39
5.4.420.0830.05319.32
5.4.410.0730.05719.05
5.4.400.1700.06718.78
5.4.390.1330.05718.80
5.4.380.0270.05018.61
5.4.370.0270.05718.70
5.4.360.0270.04018.71
5.4.350.0170.04812.03
5.4.340.0140.03412.03
5.4.320.0070.03412.52
5.4.310.0110.04812.51
5.4.300.0030.03912.52
5.4.290.0070.03612.51
5.4.280.0060.03512.41
5.4.270.0070.03612.41
5.4.260.0050.04012.41
5.4.250.0070.03812.41
5.4.240.0170.04018.88
5.4.230.0030.05718.84
5.4.220.0000.06018.79
5.4.210.0130.06718.85
5.4.200.0070.05018.66
5.4.190.0130.05018.85
5.4.180.0030.05318.91
5.4.170.0100.05018.57
5.4.160.0030.05018.78
5.4.150.0070.05318.69
5.4.140.0130.04316.53
5.4.130.0030.07016.44
5.4.120.0100.04716.38
5.4.110.0130.04316.48
5.4.100.0070.06016.32
5.4.90.0070.04716.47
5.4.80.0100.05716.54
5.4.70.0130.04316.38
5.4.60.0030.05316.44
5.4.50.0100.04716.38
5.4.40.0200.04316.52
5.4.30.0030.05316.46
5.4.20.0170.04016.45
5.4.10.0170.04016.33
5.4.00.0070.04715.94
5.3.290.0100.04212.80
5.3.280.0070.04714.68
5.3.270.0070.05714.80
5.3.260.0130.05714.60
5.3.250.0030.05314.70
5.3.240.0070.06314.71
5.3.230.0100.04714.77
5.3.220.0070.05014.55
5.3.210.0130.04314.66
5.3.200.0070.04714.67
5.3.190.0070.05014.67
5.3.180.0130.04314.63
5.3.170.0100.04714.71
5.3.160.0100.06014.41
5.3.150.0030.05714.69
5.3.140.0030.05314.66
5.3.130.0030.05714.75
5.3.120.0030.07714.57
5.3.110.0100.08314.74
5.3.100.0070.04714.22
5.3.90.0070.06014.11
5.3.80.0200.05313.95
5.3.70.0000.05314.04
5.3.60.0100.06314.09
5.3.50.0070.05314.14
5.3.40.0000.05713.95
5.3.30.0130.04313.98
5.3.20.0030.05013.68
5.3.10.0030.05013.57
5.3.00.0070.04713.73
5.2.170.0070.04011.33
5.2.160.0030.04011.25
5.2.150.0070.04011.39
5.2.140.0000.04311.24
5.2.130.0000.04311.13
5.2.120.0170.04710.95
5.2.110.0070.03711.07
5.2.100.0070.04711.23
5.2.90.0070.03711.20
5.2.80.0070.06011.29
5.2.70.0070.05311.10
5.2.60.0000.04311.05
5.2.50.0100.05311.01
5.2.40.0000.04311.02
5.2.30.0070.04711.15
5.2.20.0030.04311.04
5.2.10.0030.05310.78
5.2.00.0000.04310.82
5.1.60.0130.04310.08
5.1.50.0070.03310.01
5.1.40.0030.03710.09
5.1.30.0070.04710.43
5.1.20.0070.03310.28
5.1.10.0030.03710.29
5.1.00.0030.03310.28
5.0.50.0000.0308.41
5.0.40.0030.0378.28
5.0.30.0070.0438.21
5.0.20.0030.0278.23
5.0.10.0100.0238.32
5.0.00.0130.0438.14
4.4.90.0070.0275.85
4.4.80.0000.0205.86
4.4.70.0030.0235.85
4.4.60.0030.0305.85
4.4.50.0070.0175.85
4.4.40.0000.0375.85
4.4.30.0000.0236.63
4.4.20.0000.0236.63
4.4.10.0100.0136.63
4.4.00.0030.0376.63
4.3.110.0000.0236.63
4.3.100.0070.0176.63
4.3.90.0070.0176.63
4.3.80.0100.0276.63
4.3.70.0100.0136.63
4.3.60.0000.0206.63
4.3.50.0030.0206.63
4.3.40.0100.0236.63
4.3.30.0030.0206.63
4.3.20.0000.0276.63
4.3.10.0000.0236.63
4.3.00.0130.0207.09

preferences:
40.14 ms | 401 KiB | 5 Q