3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Heart{ public function Beat(){ echo 'bump bump'."\n"; } } class Animal{ protected $myVar; protected $heart; public function __construct() { $this->myVar = 'a'; $this->heart = new Heart(); } } class Cat extends Animal { function __construct(){ parent::__construct(); } public function foo() { echo $this->myVar."\n"; echo $this->heart."\n"; echo $this->heart->Beat(); } } $cat = new Cat(); $cat->foo();

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.01116.73
8.3.50.0110.00918.31
8.3.40.0040.01118.79
8.3.30.0120.00318.71
8.3.20.0070.01318.90
8.3.10.0090.00020.34
8.3.00.0080.00019.50
8.2.180.0070.00716.50
8.2.170.0140.00722.96
8.2.160.0100.00618.90
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00418.85
8.2.110.0030.01620.93
8.2.100.0060.00617.91
8.2.90.0030.00719.38
8.2.80.0070.00019.21
8.2.70.0090.00017.63
8.2.60.0040.00417.79
8.2.50.0080.00018.07
8.2.40.0040.00419.82
8.2.30.0040.00418.01
8.2.20.0030.00717.72
8.2.10.0000.00817.75
8.2.00.0000.00817.68
8.1.280.0140.00725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0090.00022.47
8.1.230.0070.00420.91
8.1.220.0000.00817.74
8.1.210.0070.00518.77
8.1.200.0060.00317.35
8.1.190.0070.00017.66
8.1.180.0000.00818.10
8.1.170.0040.00418.75
8.1.160.0000.00718.80
8.1.150.0040.00418.50
8.1.140.0000.00917.49
8.1.130.0030.00317.88
8.1.120.0040.00417.34
8.1.110.0040.00417.41
8.1.100.0050.00217.40
8.1.90.0030.00417.46
8.1.80.0000.00817.44
8.1.70.0000.00717.33
8.1.60.0040.00417.63
8.1.50.0080.00017.42
8.1.40.0030.00517.41
8.1.30.0040.00417.68
8.1.20.0040.00417.56
8.1.10.0000.00817.64
8.1.00.0040.00417.45
8.0.300.0050.00219.89
8.0.290.0000.00816.75
8.0.280.0000.00718.45
8.0.270.0030.00317.17
8.0.260.0060.00016.84
8.0.250.0030.00617.06
8.0.240.0050.00217.01
8.0.230.0040.00417.07
8.0.220.0000.00717.00
8.0.210.0030.00316.92
8.0.200.0000.00717.03
8.0.190.0070.00016.99
8.0.180.0030.00516.90
8.0.170.0060.00316.82
8.0.160.0040.00416.91
8.0.150.0000.00816.95
8.0.140.0070.00016.94
8.0.130.0000.00513.40
8.0.120.0070.00016.93
8.0.110.0040.00416.82
8.0.100.0080.00017.06
8.0.90.0070.00016.80
8.0.80.0030.01316.95
8.0.70.0050.00316.94
8.0.60.0050.00216.74
8.0.50.0000.00716.96
8.0.30.0100.00716.98
8.0.20.0100.00717.13
8.0.10.0000.00716.87
8.0.00.0040.01416.76
7.4.330.0020.00212.94
7.4.320.0000.00616.50
7.4.300.0030.00316.65
7.4.290.0070.00016.50
7.4.280.0000.00816.64
7.4.270.0000.00616.52
7.4.260.0060.00013.39
7.4.250.0000.00816.63
7.4.240.0070.00016.59
7.4.230.0000.00716.37
7.4.220.0160.00616.51
7.4.210.0070.00716.54
7.4.200.0000.00616.39
7.4.190.0000.00816.70
7.4.160.0120.00416.54
7.4.150.0040.01416.45
7.4.140.0070.01016.36
7.4.130.0130.00416.56
7.4.120.0120.00416.46
7.4.110.0130.00316.42
7.4.100.0080.00816.53
7.4.90.0110.00716.44
7.4.80.0170.00019.39
7.4.70.0060.01016.52
7.4.60.0060.00916.66
7.4.50.0000.00516.63
7.4.40.0060.00916.13
7.4.30.0180.00316.31
7.4.00.0050.01214.88
7.3.330.0030.00313.29
7.3.320.0030.00313.32
7.3.310.0030.00316.40
7.3.300.0050.00216.29
7.3.290.0090.00516.32
7.3.280.0100.00816.37
7.3.270.0130.00316.34
7.3.260.0140.00316.44
7.3.250.0090.00916.38
7.3.240.0060.00916.55
7.3.230.0100.00616.52
7.3.210.0120.01316.50
7.3.200.0100.00716.47
7.3.190.0110.00516.39
7.3.180.0090.00616.37
7.3.170.0030.01716.27
7.3.160.0030.01216.60
7.3.120.0120.00614.92
7.3.110.0080.01014.63
7.3.100.0070.00614.79
7.3.90.0050.00814.97
7.3.80.0080.00414.68
7.3.70.0100.00614.74
7.3.60.0080.00614.74
7.3.50.0010.00914.71
7.3.40.0040.00714.79
7.3.30.0070.00414.94
7.3.20.0040.01116.68
7.3.10.0060.00716.48
7.3.00.0060.00616.63
7.2.330.0090.00916.47
7.2.320.0140.00316.43
7.2.310.0140.01016.75
7.2.300.0140.00716.30
7.2.290.0110.00616.78
7.2.250.0090.00714.95
7.2.240.0090.00714.94
7.2.230.0050.01215.18
7.2.220.0060.00815.33
7.2.210.0070.00815.27
7.2.200.0090.00515.13
7.2.190.0100.00515.03
7.2.180.0060.00815.11
7.2.170.0050.00814.96
7.2.130.0070.00316.86
7.2.120.0100.00316.77
7.2.110.0030.00717.04
7.2.100.0030.00916.86
7.2.90.0030.00616.81
7.2.80.0000.01417.02
7.2.70.0030.01016.94
7.2.60.0050.00817.06
7.2.50.0080.00417.08
7.2.40.0110.00416.79
7.2.30.0070.00716.93
7.2.20.0050.00517.18
7.2.10.0110.00316.98
7.2.00.0070.00618.12
7.1.330.0060.00815.73
7.1.320.0050.01015.79
7.1.310.0080.00615.83
7.1.300.0080.00715.74
7.1.290.0040.00815.81
7.1.280.0090.00615.78
7.1.270.0030.01015.79
7.1.260.0050.00815.78
7.1.250.0070.00715.71
7.1.200.0060.00615.51
7.1.100.0070.00718.21
7.1.70.0000.00817.15
7.1.60.0090.01519.31
7.1.50.0100.01316.77
7.1.00.0000.07022.41
7.0.200.0040.00416.66
7.0.140.0030.07322.00
7.0.120.0070.07022.09
7.0.60.0000.09019.98
7.0.50.0100.06317.97
7.0.40.0070.06320.20
7.0.30.0270.04020.22
7.0.20.0270.08020.30
7.0.10.0030.08320.10
7.0.00.0000.05720.07
5.6.280.0030.07020.82
5.6.210.0070.05720.73
5.6.200.0070.05318.27
5.6.190.0000.08320.46
5.6.180.0270.06020.33
5.6.170.0270.07720.58
5.6.160.0100.08020.57
5.6.150.0100.07318.23
5.6.140.0130.03018.22
5.6.130.0030.05318.15
5.6.120.0170.07321.02
5.6.110.0000.05721.13
5.6.100.0400.05721.02
5.6.90.0030.04721.13
5.6.80.0030.08720.54
5.5.350.0300.08020.47
5.5.340.0070.08018.05
5.5.330.0100.04020.23
5.5.320.0270.04020.25
5.5.310.0470.06320.24
5.5.300.0070.04717.98
5.5.290.0100.07718.01
5.5.280.0100.08020.88
5.5.270.0130.07320.85
5.5.260.0030.09020.62
5.5.250.0200.04320.59
5.5.240.0000.08320.25
5.4.450.0030.04719.48
5.4.440.0000.04319.47
5.4.430.0200.03719.30
5.4.420.0070.04319.30
5.4.410.0000.04319.20
5.4.400.0030.06718.93
5.4.390.0030.05019.14
5.4.380.0130.06719.00
5.4.370.0030.06319.20
5.4.360.0170.07319.16
5.4.350.0070.06318.85
5.4.340.0070.07719.11
5.4.320.0070.05319.24
5.4.310.0000.08019.20
5.4.300.0000.04318.87
5.4.290.0070.08019.24
5.4.280.0070.05718.92
5.4.270.0030.05018.97
5.4.260.0030.05019.16
5.4.250.0030.05318.87
5.4.240.0000.04318.84
5.4.230.0100.03318.91
5.4.220.0070.08019.23
5.4.210.0070.07019.09
5.4.200.0070.05018.86
5.4.190.0070.04319.11
5.4.180.0130.07019.13
5.4.170.0070.05719.07
5.4.160.0070.03719.06
5.4.150.0070.03719.10
5.4.140.0100.03016.41
5.4.130.0030.04316.36
5.4.120.0000.07016.59
5.4.110.0000.04716.41
5.4.100.0030.04016.35
5.4.90.0000.04316.44
5.4.80.0070.06016.38
5.4.70.0030.06016.46
5.4.60.0030.05716.51
5.4.50.0070.07316.38
5.4.40.0030.07316.38
5.4.30.0100.07316.32
5.4.20.0070.05716.30
5.4.10.0200.05716.36
5.4.00.0100.03715.91
5.3.290.0030.04714.71
5.3.280.0100.03314.59
5.3.270.0030.08314.64
5.3.260.0030.06314.66
5.3.250.0070.08014.61
5.3.240.0030.04714.66
5.3.230.0030.05314.60
5.3.220.0030.05014.60
5.3.210.0070.04014.60
5.3.200.0030.03714.49
5.3.190.0070.06314.57
5.3.180.0030.04314.59
5.3.170.0030.06314.61
5.3.160.0030.08014.49
5.3.150.0100.06314.64
5.3.140.0030.05014.62
5.3.130.0070.05714.64
5.3.120.0030.06714.57
5.3.110.0030.04014.70
5.3.100.0070.04714.05
5.3.90.0000.04014.02
5.3.80.0070.04313.92
5.3.70.0000.04314.06
5.3.60.0070.03314.03
5.3.50.0100.03713.96
5.3.40.0030.03713.99
5.3.30.0070.06714.07
5.3.20.0030.06013.70
5.3.10.0100.02713.55
5.3.00.0130.06313.67
5.2.170.0000.03311.21
5.2.160.0030.02711.16
5.2.150.0030.05311.20
5.2.140.0030.06011.32
5.2.130.0030.05311.15
5.2.120.0000.04711.17
5.2.110.0030.06711.26
5.2.100.0000.06711.15
5.2.90.0030.03711.17
5.2.80.0070.05711.16
5.2.70.0100.06311.13
5.2.60.0130.05710.95
5.2.50.0000.04711.06
5.2.40.0000.06311.16
5.2.30.0070.06311.05
5.2.20.0030.05010.96
5.2.10.0030.06310.87
5.2.00.0000.05710.63
5.1.60.0100.0409.98
5.1.50.0070.0439.98
5.1.40.0070.04710.05
5.1.30.0030.05310.34
5.1.20.0000.04010.28
5.1.10.0030.02710.13
5.1.00.0000.03010.13
5.0.50.0000.0238.69
5.0.40.0000.0278.43
5.0.30.0000.0708.25
5.0.20.0030.0408.27
5.0.10.0000.0478.09
5.0.00.0000.0438.07
4.4.90.0000.0377.84
4.4.80.0000.0407.84
4.4.70.0070.0337.84
4.4.60.0000.0407.84
4.4.50.0070.0207.84
4.4.40.0000.0437.84
4.4.30.0030.0377.84
4.4.20.0030.0337.84
4.4.10.0030.0137.84
4.4.00.0070.0537.84
4.3.110.0030.0337.84
4.3.100.0000.0407.84
4.3.90.0000.0307.84
4.3.80.0030.0377.84
4.3.70.0000.0207.84
4.3.60.0030.0337.84
4.3.50.0030.0337.84
4.3.40.0000.0437.84
4.3.30.0030.0307.84
4.3.20.0000.0377.84
4.3.10.0000.0237.84
4.3.00.0030.0277.84

preferences:
38.67 ms | 401 KiB | 5 Q