3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $foo; public function __construct($foo) { $this->foo = $foo; } private function bar() { echo 'Accessed the private method.'; } public function baz(Test $other) { // We can change the private property: $other->foo = 'hello'; var_dump($other->foo); // We can also call the private method: $other->bar(); } } $test = new Test('test'); $test->baz(new Test('other'));

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.00416.50
8.3.50.0140.00522.14
8.3.40.0040.01118.75
8.3.30.0070.00718.63
8.3.20.0080.00020.34
8.3.10.0040.00421.80
8.3.00.0080.00023.70
8.2.180.0120.00616.38
8.2.170.0090.00622.96
8.2.160.0130.00020.44
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.66
8.2.120.0000.00826.35
8.2.110.0100.01022.11
8.2.100.0080.00317.93
8.2.90.0000.00919.21
8.2.80.0080.00017.97
8.2.70.0090.00017.63
8.2.60.0080.00018.05
8.2.50.0040.00418.07
8.2.40.0000.00822.07
8.2.30.0000.00719.25
8.2.20.0040.00417.63
8.2.10.0080.00017.87
8.2.00.0000.00718.00
8.1.280.0110.01125.92
8.1.270.0040.00423.67
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0040.00422.19
8.1.230.0110.00019.15
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0040.00417.24
8.1.190.0080.00017.23
8.1.180.0000.00718.10
8.1.170.0000.00818.52
8.1.160.0040.00420.69
8.1.150.0000.00718.82
8.1.140.0030.00619.43
8.1.130.0000.00717.54
8.1.120.0030.00317.29
8.1.110.0040.00417.33
8.1.100.0040.00417.29
8.1.90.0000.00717.42
8.1.80.0080.00017.30
8.1.70.0030.00317.46
8.1.60.0000.00817.59
8.1.50.0090.00017.40
8.1.40.0050.00217.42
8.1.30.0080.00017.49
8.1.20.0000.00717.61
8.1.10.0090.00017.46
8.1.00.0070.00017.55
8.0.300.0030.00618.77
8.0.290.0000.00816.75
8.0.280.0040.00418.45
8.0.270.0000.00717.25
8.0.260.0030.00517.20
8.0.250.0000.00616.97
8.0.240.0040.00416.83
8.0.230.0030.00316.85
8.0.220.0030.00316.79
8.0.210.0000.00716.82
8.0.200.0000.00816.96
8.0.190.0000.00817.02
8.0.180.0000.00816.85
8.0.170.0080.00016.94
8.0.160.0090.00016.79
8.0.150.0040.00416.93
8.0.140.0040.00416.72
8.0.130.0080.00013.27
8.0.120.0000.00916.84
8.0.110.0000.00716.76
8.0.100.0030.00516.91
8.0.90.0040.00416.76
8.0.80.0070.01116.88
8.0.70.0000.00716.78
8.0.60.0050.00316.88
8.0.50.0040.00416.84
8.0.30.0060.01117.34
8.0.20.0080.01217.40
8.0.10.0000.00817.05
8.0.00.0120.00716.68
7.4.330.0020.00216.71
7.4.320.0000.00616.47
7.4.300.0040.00416.52
7.4.290.0000.00616.47
7.4.280.0040.00416.35
7.4.270.0080.00016.50
7.4.260.0030.00316.49
7.4.250.0030.00616.48
7.4.240.0020.00516.61
7.4.230.0040.00416.35
7.4.220.0040.01516.38
7.4.210.0040.01116.63
7.4.200.0030.00316.55
7.4.160.0090.00916.63
7.4.150.0070.01017.40
7.4.140.0160.00217.86
7.4.130.0080.01216.58
7.4.120.0110.01016.61
7.4.110.0140.00316.73
7.4.100.0090.01216.63
7.4.90.0120.00616.53
7.4.80.0070.01319.39
7.4.70.0090.00816.43
7.4.60.0030.01316.49
7.4.50.0000.01316.46
7.4.40.0130.00316.41
7.4.30.0080.01216.26
7.4.00.0090.00615.13
7.3.330.0060.00013.27
7.3.320.0000.00613.25
7.3.310.0040.00416.20
7.3.300.0030.00316.18
7.3.290.0060.01016.28
7.3.280.0090.00916.29
7.3.270.0120.00617.40
7.3.260.0180.00016.42
7.3.250.0080.00916.26
7.3.240.0080.00916.36
7.3.230.0160.00016.39
7.3.210.0110.00616.27
7.3.200.0120.00919.39
7.3.190.0040.01216.31
7.3.180.0040.01316.30
7.3.170.0060.00916.41
7.3.160.0130.00316.58
7.3.10.0150.00416.61
7.3.00.0070.01116.62
7.2.330.0160.00816.79
7.2.320.0140.00316.38
7.2.310.0030.01516.39
7.2.300.0100.01316.64
7.2.290.0090.00816.53
7.2.130.0050.01116.62
7.2.120.0140.00616.19
7.2.110.0170.01016.02
7.2.100.0140.00715.94
7.2.90.0160.00616.17
7.2.80.0150.00915.95
7.2.70.0140.00716.36
7.2.60.0180.00616.25
7.2.50.0170.00916.21
7.2.40.0300.00816.39
7.2.30.0240.00415.86
7.2.20.0270.00715.95
7.2.10.0170.01015.75
7.2.00.0150.00915.77
7.1.250.0070.00715.45
7.1.240.0120.00715.18
7.1.230.0140.00615.22
7.1.220.0120.00815.18
7.1.210.0150.00815.08
7.1.200.0130.00615.15
7.1.190.0180.00815.11
7.1.180.0230.00315.09
7.1.170.0120.00915.20
7.1.160.0220.00715.21
7.1.150.0230.00414.73
7.1.140.0240.00514.57
7.1.130.0240.00514.62
7.1.120.0330.00814.64
7.1.110.0190.00614.82
7.1.100.0150.00915.30
7.1.90.0110.00814.79
7.1.80.0140.01014.56
7.1.70.0220.00715.33
7.1.60.0230.00615.70
7.1.50.0240.01018.59
7.1.40.0180.00814.67
7.1.30.0180.00614.81
7.1.20.0190.00514.59
7.1.10.0220.00614.56
7.1.00.0220.02216.09
7.0.330.0080.00515.14
7.0.320.0120.01114.67
7.0.310.0170.00914.88
7.0.300.0320.00914.78
7.0.290.0200.00614.73
7.0.280.0190.00814.23
7.0.270.0270.00614.41
7.0.260.0450.00914.19
7.0.250.0140.00614.36
7.0.240.0260.00514.43
7.0.230.0210.00714.49
7.0.220.0260.00714.45
7.0.210.0150.01014.31
7.0.200.0150.00514.80
7.0.190.0200.00714.45
7.0.180.0170.00614.37
7.0.170.0240.00914.43
7.0.160.0230.00814.34
7.0.150.0280.00714.36
7.0.140.0310.00614.53
7.0.130.0320.00914.53
7.0.120.0450.00514.30
7.0.110.0310.00714.22
7.0.100.0220.00814.43
7.0.90.0230.00614.31
7.0.80.0240.00514.47
7.0.70.0190.01014.32
7.0.60.0250.01615.83
7.0.50.0210.02115.06
7.0.40.0620.02114.78
7.0.30.0310.02214.72
7.0.20.0290.01814.65
7.0.10.0210.01214.84
7.0.00.0190.02414.74
5.6.380.0040.01014.29
5.6.370.0090.00914.03
5.6.360.0070.00914.19
5.6.350.0070.00914.24
5.6.340.0090.00714.08
5.6.330.0080.00914.24
5.6.320.0130.00414.29
5.6.310.0050.01014.30
5.6.300.0060.01014.26
5.6.290.0080.00714.37
5.6.280.0060.01515.66
5.6.270.0090.00914.27
5.6.260.0080.00914.11
5.6.250.0090.00614.26
5.6.240.0090.00714.06
5.6.230.0060.01114.17
5.6.220.0050.00914.17
5.6.210.0110.01515.48
5.6.200.0080.02215.04
5.6.190.0090.02415.44
5.6.180.0140.01415.47
5.6.170.0120.02415.43
5.6.160.0090.01915.34
5.6.150.0070.01815.05
5.6.140.0040.02614.99
5.6.130.0070.02214.98
5.6.120.0100.01315.41
5.6.110.0080.02215.57
5.6.100.0110.01615.53
5.6.90.0080.02315.46
5.6.80.0070.01615.38
5.6.70.0080.00714.19
5.6.60.0090.00614.07
5.6.50.0080.00814.01
5.6.40.0070.00914.06
5.6.30.0070.00614.13
5.6.20.0080.00814.09
5.6.10.0060.00914.10
5.6.00.0090.00614.21
5.5.380.0110.00210.92
5.5.370.0070.00711.14
5.5.360.0100.00411.16
5.5.350.0090.01913.05
5.5.340.0080.01212.52
5.5.330.0110.01013.07
5.5.320.0150.01813.06
5.5.310.0150.01113.06
5.5.300.0080.02112.61
5.5.290.0080.01712.62
5.5.280.0080.02113.08
5.5.270.0080.01113.18
5.5.260.0060.02313.03
5.5.250.0070.01213.02
5.5.240.0070.02012.91
5.5.230.0030.00711.13
5.5.220.0080.00611.22
5.5.210.0050.00811.12
5.5.200.0080.00311.06
5.5.190.0090.00311.05
5.5.180.0070.00611.20
5.5.170.0150.00312.73
5.5.160.0070.00811.22
5.5.150.0090.00311.11
5.5.140.0050.01011.07
5.5.130.0080.00511.26
5.5.120.0030.00811.18
5.5.110.0060.00811.07
5.5.100.0080.00511.11
5.5.90.0060.00610.84
5.5.80.0040.00911.05
5.5.70.0060.00811.12
5.5.60.0050.00611.14
5.5.50.0090.00311.11
5.5.40.0070.00610.98
5.5.30.0050.00811.06
5.5.20.0040.00711.25
5.5.10.0060.00610.96
5.5.00.0050.00511.03

preferences:
31.85 ms | 401 KiB | 5 Q