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', 'b'); $second_doge = new Doge('b'); $first_dogecoin = new DogeCoin('a', 'b'); $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.01118.55
8.3.50.0140.00922.05
8.3.40.0070.00718.79
8.3.30.0080.00520.34
8.3.20.0050.00320.39
8.3.10.0000.00722.09
8.3.00.0040.00422.37
8.2.180.0150.00618.29
8.2.170.0110.00322.96
8.2.160.0070.01122.25
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0170.00026.16
8.2.120.0080.00019.36
8.2.110.0030.00622.05
8.2.100.0110.00017.72
8.2.90.0030.00619.17
8.2.80.0040.00419.34
8.2.70.0050.00317.75
8.2.60.0090.00017.93
8.2.50.0030.00518.07
8.2.40.0040.00418.03
8.2.30.0000.00818.07
8.2.20.0000.00717.76
8.2.10.0070.00017.73
8.2.00.0030.00617.75
8.1.270.0090.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.79
8.1.230.0000.01119.22
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0000.01017.36
8.1.190.0080.00017.54
8.1.180.0000.00819.11
8.1.170.0040.00418.57
8.1.160.0030.00322.13
8.1.150.0000.00818.73
8.1.140.0000.00717.37
8.1.130.0070.00017.87
8.1.120.0000.00817.53
8.1.110.0040.00417.53
8.1.100.0030.00517.46
8.1.90.0000.00817.54
8.1.80.0050.00317.48
8.1.70.0050.00317.48
8.1.60.0000.00817.61
8.1.50.0000.00817.46
8.1.40.0040.00417.55
8.1.30.0040.00417.60
8.1.20.0040.00417.68
8.1.10.0000.00817.50
8.1.00.0030.00717.47
8.0.300.0050.00218.77
8.0.290.0040.00417.18
8.0.280.0000.00718.49
8.0.270.0030.00317.21
8.0.260.0080.00016.92
8.0.250.0020.00517.05
8.0.240.0050.00316.99
8.0.230.0070.00016.93
8.0.220.0030.00316.98
8.0.210.0050.00316.97
8.0.200.0040.00417.09
8.0.190.0040.00417.08
8.0.180.0050.00216.99
8.0.170.0030.00516.97
8.0.160.0030.00317.06
8.0.150.0000.00717.01
8.0.140.0040.00416.82
8.0.130.0000.00613.37
8.0.120.0050.00216.96
8.0.110.0040.00417.02
8.0.100.0040.00416.86
8.0.90.0000.00716.88
8.0.80.0110.00717.00
8.0.70.0040.00416.95
8.0.60.0000.00816.83
8.0.50.0000.00716.82
8.0.30.0090.00916.97
8.0.20.0110.00817.40
8.0.10.0040.00417.16
8.0.00.0080.00916.82
7.4.330.0050.00315.00
7.4.320.0000.00616.63
7.4.300.0000.00616.65
7.4.290.0050.00316.56
7.4.280.0000.00716.63
7.4.270.0000.00816.54
7.4.260.0070.00013.34
7.4.250.0080.00016.43
7.4.240.0050.00216.59
7.4.230.0030.00316.52
7.4.220.0090.01016.64
7.4.210.0050.01316.61
7.4.200.0000.00716.62
7.4.190.0000.00716.79
7.4.160.0060.00916.46
7.4.150.0170.00417.40
7.4.140.0060.01117.86
7.4.130.0100.00716.62
7.4.120.0070.01316.65
7.4.110.0130.01016.76
7.4.100.0130.00916.73
7.4.90.0000.02216.59
7.4.80.0120.00619.39
7.4.70.0000.01616.56
7.4.60.0130.00316.43
7.4.50.0030.00616.32
7.4.40.0000.01422.77
7.4.30.0100.00716.46
7.4.00.0100.00814.85
7.3.330.0050.00013.34
7.3.320.0000.00513.34
7.3.310.0000.00716.22
7.3.300.0030.00316.39
7.3.290.0140.00516.34
7.3.280.0050.01116.39
7.3.270.0070.01017.40
7.3.260.0090.00916.44
7.3.250.0050.01316.53
7.3.240.0090.00916.43
7.3.230.0110.00716.39
7.3.210.0000.01716.40
7.3.200.0050.01119.39
7.3.190.0170.00316.37
7.3.180.0090.00916.38
7.3.170.0090.00616.49
7.3.160.0080.00816.48
7.3.120.0110.00414.86
7.3.110.0030.01314.71
7.3.100.0070.01014.73
7.3.90.0090.00414.68
7.3.80.0070.00714.96
7.3.70.0090.00614.40
7.3.60.0040.01114.92
7.3.50.0060.00915.01
7.3.40.0000.01114.73
7.3.30.0070.00715.02
7.3.20.0030.01316.86
7.3.10.0150.00716.53
7.3.00.0090.00716.51
7.2.330.0060.01316.75
7.2.320.0060.01216.78
7.2.310.0100.01016.63
7.2.300.0140.00316.85
7.2.290.0080.00816.87
7.2.250.0070.01115.10
7.2.240.0090.00915.04
7.2.230.0060.00314.83
7.2.220.0130.00315.01
7.2.210.0130.00315.29
7.2.200.0030.01215.19
7.2.190.0070.00715.17
7.2.180.0100.00715.27
7.2.170.0060.00915.05
7.2.130.0070.00716.27
7.2.120.0100.01016.51
7.2.110.0070.01116.25
7.2.100.0100.00716.08
7.2.90.0040.00716.56
7.2.80.0130.00716.42
7.2.70.0390.00416.41
7.2.60.0100.01316.72
7.2.50.0310.00917.08
7.2.40.0200.00316.55
7.2.30.0230.01016.96
7.2.20.0570.00417.02
7.2.10.0430.00916.93
7.2.00.0370.00318.13
7.1.330.0040.01215.78
7.1.320.0080.00815.74
7.1.310.0030.00615.89
7.1.300.0070.00315.92
7.1.290.0040.01015.89
7.1.280.0030.01015.82
7.1.270.0000.01015.80
7.1.260.0060.00615.84
7.1.250.0180.00315.46
7.1.200.0080.00415.54
7.1.70.0050.00217.19
7.1.60.0100.00317.38
7.1.50.0030.00717.00
7.1.00.0030.07322.36
7.0.200.0160.00816.82
7.0.140.0070.04022.04
7.0.60.0200.06719.92
7.0.50.0000.04317.75
7.0.40.0100.05020.27
7.0.30.0430.06320.08
7.0.20.0270.05320.05
7.0.10.0070.06020.23
7.0.00.0100.08320.19
5.6.280.0070.07020.92
5.6.210.0100.07720.62
5.6.200.0100.04718.28
5.6.190.0200.07720.57
5.6.180.0130.05320.46
5.6.170.0070.05320.58
5.6.160.0070.04020.61
5.6.150.0000.04718.18
5.6.140.0030.08318.15
5.6.130.0070.07018.15
5.6.120.0200.07021.00
5.6.110.0100.07720.97
5.6.100.0230.06021.00
5.6.90.0100.08321.02
5.6.80.0070.05320.60
5.5.350.0230.04020.37
5.5.340.0000.08017.98
5.5.330.0100.08320.38
5.5.320.0030.08020.24
5.5.310.0270.07320.34
5.5.300.0070.05017.98
5.5.290.0100.04317.94
5.5.280.0100.04020.67
5.5.270.0200.07320.94
5.5.260.0170.07320.91
5.5.250.0030.07320.70
5.5.240.0200.08320.25
5.4.450.0070.06019.31
5.4.440.1000.06019.30
5.4.430.0670.06719.16
5.4.420.1000.04719.60
5.4.410.0100.05319.01
5.4.400.0200.05718.68
5.4.390.0430.06018.54
5.4.380.0130.05318.77
5.4.370.0170.03318.71
5.4.360.0070.04318.59
5.4.350.0070.05112.03
5.4.340.0080.03312.03
5.4.320.0050.03612.52
5.4.310.0050.04312.51
5.4.300.0090.03712.52
5.4.290.0090.03812.51
5.4.280.0080.04012.41
5.4.270.0040.04012.41
5.4.260.0080.04212.41
5.4.250.0100.04212.41
5.4.240.0100.04718.78
5.4.230.0170.06318.84
5.4.220.0030.06318.73
5.4.210.0100.07018.99
5.4.200.0170.05718.70
5.4.190.0130.07318.68
5.4.180.0170.05318.86
5.4.170.0070.07018.97
5.4.160.0070.05318.88
5.4.150.0100.04718.72
5.4.140.0000.05316.36
5.4.130.0130.04316.39
5.4.120.0030.04716.35
5.4.110.0100.04716.48
5.4.100.0030.05016.36
5.4.90.0030.05316.37
5.4.80.0000.05316.39
5.4.70.0070.04716.57
5.4.60.0100.04716.43
5.4.50.0070.04716.29
5.4.40.0030.05316.37
5.4.30.0070.05316.40
5.4.20.0070.05016.45
5.4.10.0000.05716.26
5.4.00.0030.04715.87
5.3.290.0060.03812.80
5.3.280.0030.07014.64
5.3.270.0070.07314.71
5.3.260.0000.06314.80
5.3.250.0000.08014.69
5.3.240.0100.04714.62
5.3.230.0070.04714.69
5.3.220.0070.05014.41
5.3.210.0000.06714.68
5.3.200.0070.06714.49
5.3.190.0100.04314.76
5.3.180.0170.04314.66
5.3.170.0100.04714.66
5.3.160.0000.05314.57
5.3.150.0030.05714.55
5.3.140.0070.04714.66
5.3.130.0070.05014.54
5.3.120.0200.05714.48
5.3.110.0030.06314.72
5.3.100.0100.04714.08
5.3.90.0200.05314.21
5.3.80.0130.04013.86
5.3.70.0030.05014.11
5.3.60.0030.07014.08
5.3.50.0070.06314.06
5.3.40.0200.03713.98
5.3.30.0070.04314.01
5.3.20.0130.06013.61
5.3.10.0030.05713.89
5.3.00.0100.04313.48
5.2.170.0000.04311.25
5.2.160.0100.03311.23
5.2.150.0070.04011.32
5.2.140.0030.04311.24
5.2.130.0130.03311.11
5.2.120.0000.05311.03
5.2.110.0130.03011.12
5.2.100.0100.03711.22
5.2.90.0070.05011.12
5.2.80.0000.05011.34
5.2.70.0030.04011.11
5.2.60.0000.04311.13
5.2.50.0000.04311.02
5.2.40.0030.04011.10
5.2.30.0100.03711.07
5.2.20.0030.05310.98
5.2.10.0030.05011.04
5.2.00.0030.04010.82
5.1.60.0030.0339.98
5.1.50.0000.03710.25
5.1.40.0000.0409.96
5.1.30.0070.03010.30
5.1.20.0000.03710.38
5.1.10.0030.03310.14
5.1.00.0030.03310.08
5.0.50.0070.0238.41
5.0.40.0000.0308.39
5.0.30.0000.0438.32
5.0.20.0030.0308.38
5.0.10.0000.0308.20
5.0.00.0030.0408.03
4.4.90.0000.0206.63
4.4.80.0000.0236.63
4.4.70.0000.0276.63
4.4.60.0000.0276.63
4.4.50.0000.0306.63
4.4.40.0030.0306.63
4.4.30.0000.0236.63
4.4.20.0000.0306.63
4.4.10.0000.0236.63
4.4.00.0070.0376.63
4.3.110.0000.0206.63
4.3.100.0000.0206.63
4.3.90.0030.0176.63
4.3.80.0030.0306.63
4.3.70.0030.0206.63
4.3.60.0070.0136.63
4.3.50.0000.0276.63
4.3.40.0030.0306.63
4.3.30.0030.0206.63
4.3.20.0000.0236.63
4.3.10.0000.0306.63
4.3.00.0130.0238.54

preferences:
50.77 ms | 400 KiB | 5 Q