3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class MyClass { private $prop1 = "foo"; private $prop2 = "bar"; public function func1() { global $prop1; global $prop2; // by declaring global variables inside this method, it works! echo $prop1; } } $bj1 = new MyClass(); $obj1->func1();

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.01218.56
8.3.50.0140.00521.14
8.3.40.0070.00718.71
8.3.30.0140.00020.31
8.3.20.0000.00820.04
8.3.10.0040.00422.04
8.3.00.0080.00022.40
8.2.180.0120.00916.63
8.2.170.0060.00922.96
8.2.160.0140.00022.27
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00220.87
8.2.110.0030.00622.16
8.2.100.0120.00017.84
8.2.90.0000.00818.99
8.2.80.0050.00319.23
8.2.70.0040.00717.50
8.2.60.0000.00818.04
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0040.00419.36
8.2.20.0040.00417.70
8.2.10.0040.00417.60
8.2.00.0070.00017.69
8.1.280.0070.00725.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.84
8.1.230.0100.00019.21
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0050.00317.41
8.1.180.0060.00318.10
8.1.170.0000.00818.43
8.1.160.0000.00718.69
8.1.150.0060.00318.55
8.1.140.0000.00817.32
8.1.130.0030.00317.81
8.1.120.0030.00517.44
8.1.110.0040.00417.39
8.1.100.0070.00017.41
8.1.90.0040.00417.42
8.1.80.0050.00217.32
8.1.70.0000.00717.37
8.1.60.0040.00417.51
8.1.50.0000.00717.56
8.1.40.0000.00717.56
8.1.30.0000.00817.68
8.1.20.0000.00917.59
8.1.10.0000.00717.56
8.1.00.0040.00417.43
8.0.300.0050.00318.77
8.0.290.0040.00417.03
8.0.280.0030.00318.29
8.0.270.0030.00317.24
8.0.260.0000.00716.87
8.0.250.0030.00316.90
8.0.240.0040.00416.97
8.0.230.0000.00716.96
8.0.220.0060.00016.89
8.0.210.0030.00316.77
8.0.200.0040.00416.95
8.0.190.0110.00016.83
8.0.180.0000.00716.80
8.0.170.0030.00516.80
8.0.160.0030.00316.86
8.0.150.0040.00416.71
8.0.140.0070.00016.80
8.0.130.0000.00513.28
8.0.120.0030.00616.79
8.0.110.0040.00416.70
8.0.100.0000.00816.78
8.0.90.0040.00416.73
8.0.80.0090.00616.76
8.0.70.0030.00316.85
8.0.60.0040.00416.95
8.0.50.0000.00816.86
8.0.30.0120.00716.92
8.0.20.0130.00517.40
8.0.10.0040.00417.05
8.0.00.0110.00916.64
7.4.330.0030.00315.00
7.4.320.0030.00316.50
7.4.300.0000.00716.48
7.4.290.0040.00416.50
7.4.280.0070.00016.54
7.4.270.0030.00316.48
7.4.260.0030.00313.19
7.4.250.0040.00416.53
7.4.240.0050.00216.60
7.4.230.0070.00016.49
7.4.220.0120.01216.42
7.4.210.0040.01116.57
7.4.200.0040.00416.58
7.4.190.0000.00816.73
7.4.160.0060.01016.66
7.4.150.0140.00317.40
7.4.140.0020.01517.86
7.4.130.0090.00816.56
7.4.120.0110.00716.46
7.4.110.0030.01416.31
7.4.100.0120.00616.65
7.4.90.0070.01016.45
7.4.80.0130.00419.39
7.4.70.0080.00816.61
7.4.60.0060.01016.53
7.4.50.0000.00916.62
7.4.40.0090.00622.77
7.4.30.0170.00316.29
7.4.00.0030.01015.17
7.3.330.0030.00313.11
7.3.320.0000.00613.29
7.3.310.0030.00316.34
7.3.300.0000.00716.33
7.3.290.0100.00616.30
7.3.280.0100.00616.29
7.3.270.0030.01317.40
7.3.260.0070.01416.44
7.3.250.0110.00816.35
7.3.240.0090.01216.27
7.3.230.0090.00916.39
7.3.210.0030.01316.34
7.3.200.0070.01419.39
7.3.190.0100.00716.53
7.3.180.0050.01116.31
7.3.170.0100.01016.48
7.3.160.0080.00816.59
7.3.120.0070.00814.69
7.3.110.0070.00714.83
7.3.100.0040.01014.61
7.3.90.0100.00314.92
7.3.80.0050.00714.80
7.3.70.0080.00414.77
7.3.60.0050.00714.73
7.3.50.0070.00614.67
7.3.40.0090.00514.70
7.3.30.0070.00814.78
7.3.20.0070.00816.58
7.3.10.0060.00916.40
7.3.00.0070.01016.57
7.2.330.0070.01116.65
7.2.320.0130.01016.70
7.2.310.0090.00916.60
7.2.300.0130.00616.34
7.2.290.0030.01416.66
7.2.250.0040.01114.86
7.2.240.0060.00914.80
7.2.230.0060.01015.11
7.2.220.0080.00714.78
7.2.210.0000.01014.92
7.2.200.0070.00514.97
7.2.190.0070.00714.82
7.2.180.0060.00714.77
7.2.170.0060.00614.74
7.2.160.0030.01314.87
7.2.150.0060.00316.66
7.2.140.0110.00316.88
7.2.130.0030.00916.66
7.2.120.0090.00616.86
7.2.110.0000.01316.77
7.2.100.0070.01016.93
7.2.90.0040.01116.84
7.2.80.0030.01316.55
7.2.70.0100.00716.69
7.2.60.0040.00916.73
7.2.50.0040.00816.92
7.2.40.0000.01116.77
7.2.30.0090.00316.74
7.2.20.0100.00316.87
7.2.10.0030.01216.82
7.2.00.0050.00917.81
7.1.330.0080.00715.51
7.1.320.0020.01215.58
7.1.310.0060.00615.65
7.1.300.0050.00715.72
7.1.290.0070.00715.65
7.1.280.0020.01215.47
7.1.270.0070.00615.49
7.1.260.0060.00615.47
7.1.250.0060.00615.66
7.1.200.0170.01715.35
7.1.100.0060.00617.91
7.1.70.0040.00417.05
7.1.60.0030.02219.32
7.1.50.0070.01716.83
7.1.00.0000.06322.51
7.0.200.0040.00416.65
7.0.140.0070.07022.01
7.0.70.0070.06721.80
7.0.60.0070.04021.87
7.0.50.0030.08721.96
7.0.40.0000.07020.15
7.0.30.0070.09020.10
7.0.20.0030.06720.10
7.0.10.0030.06320.17
7.0.00.0070.07720.09
5.6.280.0130.06320.91
5.6.220.0000.08720.53
5.6.210.0070.07720.56
5.6.200.0100.08320.95
5.6.190.0030.07321.04
5.6.180.0130.09020.94
5.6.170.0130.07721.18
5.6.160.0070.08320.96
5.6.150.0070.08320.96
5.6.140.0070.07720.96
5.6.130.0030.08321.01
5.6.120.0030.05721.07
5.6.110.0100.08721.00
5.6.100.0000.09021.05
5.6.90.0030.09021.15
5.6.80.0070.04020.34
5.6.70.0030.07020.33
5.6.60.0100.07720.32
5.6.50.0130.06320.43
5.6.40.0030.04020.29
5.6.30.0000.07720.38
5.6.20.0030.07720.36
5.6.10.0070.07020.42
5.6.00.0030.04720.48
5.5.360.0000.06020.39
5.5.350.0070.06020.46
5.5.340.0130.05320.61
5.5.330.0030.05720.87
5.5.320.0030.08020.91
5.5.310.0130.05320.92
5.5.300.0030.06720.73
5.5.290.0000.08320.92
5.5.280.0100.07020.63
5.5.270.0100.07720.73
5.5.260.0030.08020.77
5.5.250.0070.05320.59
5.5.240.0070.03720.18
5.5.230.0000.07320.18
5.5.220.0030.08320.26
5.5.210.0170.05020.18
5.5.200.0030.04020.12
5.5.190.0030.04320.25
5.5.180.0030.04020.24
5.5.160.0030.06320.21
5.5.150.0030.04020.14
5.5.140.0070.03320.27
5.5.130.0030.03720.14
5.5.120.0030.03720.22
5.5.110.0030.04020.17
5.5.100.0000.04320.12
5.5.90.0000.04020.06
5.5.80.0100.07019.98
5.5.70.0000.07020.15
5.5.60.0030.07720.05
5.5.50.0100.05020.12
5.5.40.0130.06720.11
5.5.30.0030.07320.04
5.5.20.0000.08719.92
5.5.10.0100.07320.10
5.5.00.0130.07320.11
5.4.450.0000.08719.45
5.4.440.0000.05019.35
5.4.430.0100.03719.35
5.4.420.0070.05719.50
5.4.410.0130.06719.23
5.4.400.0070.04719.18
5.4.390.0000.08019.14
5.4.380.0030.06019.25
5.4.370.0030.06318.88
5.4.360.0000.08319.04
5.4.350.0000.06319.09
5.4.340.0130.03018.91
5.4.320.0070.03319.21
5.4.310.0000.04719.21
5.4.300.0030.03719.12
5.4.290.0000.04018.94
5.4.280.0030.03718.94
5.4.270.0000.04018.84
5.4.260.0030.06319.04
5.4.250.0030.04019.15
5.4.240.0130.06019.02
5.4.230.0070.07319.11
5.4.220.0030.06018.94
5.4.210.0100.07018.95
5.4.200.0070.07019.18
5.4.190.0100.06319.17
5.4.180.0030.06719.04
5.4.170.0100.07018.93
5.4.160.0100.06719.02
5.4.150.0100.04318.88
5.4.140.0030.07316.33
5.4.130.0070.04716.41
5.4.120.0030.06716.42
5.4.110.0030.06716.43
5.4.100.0070.07016.36
5.4.90.0070.06716.46
5.4.80.0030.07016.38
5.4.70.0070.03316.41
5.4.60.0030.05716.48
5.4.50.0030.07716.36
5.4.40.0000.06016.46
5.4.30.0030.06016.36
5.4.20.0070.07316.36
5.4.10.0030.06316.33
5.4.00.0070.04315.79
5.3.290.0000.08014.80
5.3.280.0070.07314.65
5.3.270.0030.05714.61
5.3.260.0000.05314.53
5.3.250.0030.07714.74
5.3.240.0030.05014.57
5.3.230.0000.07714.58
5.3.220.0100.06014.48
5.3.210.0030.06714.62
5.3.200.0030.07714.58
5.3.190.0070.07714.48
5.3.180.0000.08314.62
5.3.170.0030.06714.65
5.3.160.0030.07314.57
5.3.150.0070.07714.62
5.3.140.0100.07014.54
5.3.130.0030.08014.55
5.3.120.0130.06014.57
5.3.110.0030.07314.51
5.3.100.0030.06314.06
5.3.90.0030.05314.15
5.3.80.0000.07714.02
5.3.70.0070.07013.95
5.3.60.0070.06714.06
5.3.50.0030.07713.83
5.3.40.0070.07314.08
5.3.30.0030.07313.80
5.3.20.0000.05713.58
5.3.10.0030.05313.71
5.3.00.0070.05313.62
5.2.170.0070.06012.31
5.2.160.0030.04712.31
5.2.150.0070.04012.31
5.2.140.0070.05012.31
5.2.130.0070.06012.31
5.2.120.0000.06312.31
5.2.110.0000.06312.31
5.2.100.0000.06012.31
5.2.90.0070.06012.31
5.2.80.0100.05012.31
5.2.70.0030.06012.31
5.2.60.0030.06012.31
5.2.50.0030.06012.31
5.2.40.0100.05712.31
5.2.30.0000.05712.31
5.2.20.0030.06012.31
5.2.10.0030.06012.31
5.2.00.0070.06312.31
5.1.60.0000.05712.31
5.1.50.0000.06012.31
5.1.40.0030.04312.31
5.1.30.0030.04312.31
5.1.20.0000.05312.31
5.1.10.0030.05012.31
5.1.00.0000.05712.31
5.0.50.0000.03712.31
5.0.40.0000.04312.31
5.0.30.0030.06312.31
5.0.20.0030.04312.31
5.0.10.0030.04312.31
5.0.00.0000.05012.31
4.4.90.0100.03012.31
4.4.80.0000.03712.31
4.4.70.0070.03012.31
4.4.60.0000.03712.31
4.4.50.0000.03712.31
4.4.40.0000.05712.31
4.4.30.0030.03312.31
4.4.20.0030.03712.31
4.4.10.0000.03012.31
4.4.00.0000.05712.31
4.3.110.0000.03312.31
4.3.100.0070.02712.31
4.3.90.0000.03712.31
4.3.80.0000.03312.31
4.3.70.0000.02712.31
4.3.60.0030.03312.31
4.3.50.0030.03312.31
4.3.40.0000.05012.31
4.3.30.0030.03712.31
4.3.20.0030.03312.31
4.3.10.0030.03712.31
4.3.00.0070.03012.31

preferences:
48.94 ms | 401 KiB | 5 Q