3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { private $privateProperty; public function setPrivateProperty($prop) { $this->privateProperty = $prop; return $this; } public function evaluate(MyClass1 $object) { // this works, because visibility is checked on class name, not on concrete instance! var_dump($object->privateProperty); } } class MyClass1 { private $privateProperty; public function setPrivateProperty($prop) { $this->privateProperty = $prop; return $this; } } $obj1 = (new MyClass)->setPrivateProperty('foo'); $obj2 = (new MyClass1)->setPrivateProperty('bar'); $obj1->evaluate($obj2);

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.70.0090.01218.68
8.3.60.0140.00718.68
8.3.50.0100.00821.99
8.3.40.0060.00918.67
8.3.30.0110.00418.84
8.3.20.0040.00418.73
8.3.10.0040.00420.89
8.3.00.0080.00023.57
8.2.180.0030.01416.50
8.2.170.0070.00722.96
8.2.160.0040.00920.35
8.2.150.0080.00024.18
8.2.140.0070.00724.66
8.2.130.0080.00026.16
8.2.120.0080.00019.36
8.2.110.0060.00321.25
8.2.100.0090.00317.66
8.2.90.0040.00419.00
8.2.80.0000.00917.97
8.2.70.0030.00517.50
8.2.60.0000.00719.21
8.2.50.0030.00618.10
8.2.40.0000.00720.53
8.2.30.0040.00419.11
8.2.20.0000.00817.60
8.2.10.0070.00017.51
8.2.00.0040.00717.74
8.1.280.0110.00325.92
8.1.270.0080.00023.99
8.1.260.0130.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00319.07
8.1.230.0060.00618.95
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0000.00718.84
8.1.150.0040.00422.00
8.1.140.0040.00417.34
8.1.130.0000.00717.69
8.1.120.0030.00317.40
8.1.110.0040.00417.36
8.1.100.0040.00417.45
8.1.90.0030.00317.43
8.1.80.0070.00017.41
8.1.70.0070.00017.29
8.1.60.0030.00617.46
8.1.50.0080.00017.52
8.1.40.0000.00717.58
8.1.30.0000.00717.60
8.1.20.0040.00417.53
8.1.10.0050.00317.55
8.1.00.0000.00817.39
8.0.300.0030.00618.77
8.0.290.0070.00016.63
8.0.280.0000.00718.31
8.0.270.0030.00317.25
8.0.260.0030.00316.70
8.0.250.0030.00316.86
8.0.240.0040.00416.87
8.0.230.0070.00016.99
8.0.220.0030.00316.93
8.0.210.0000.00716.95
8.0.200.0000.00716.87
8.0.190.0000.00716.87
8.0.180.0000.00716.95
8.0.170.0000.00816.94
8.0.160.0000.00716.88
8.0.150.0030.00516.73
8.0.140.0000.01116.76
8.0.130.0030.00313.30
8.0.120.0000.00716.77
8.0.110.0040.00416.77
8.0.100.0070.00016.93
8.0.90.0050.00216.71
8.0.80.0070.01016.82
8.0.70.0000.00716.93
8.0.60.0050.00316.91
8.0.50.0000.00716.89
8.0.30.0100.01416.88
8.0.20.0120.00617.40
8.0.10.0050.00217.09
8.0.00.0090.01016.68
7.4.330.0020.00214.70
7.4.320.0000.00616.58
7.4.300.0000.00716.50
7.4.290.0070.00016.61
7.4.280.0090.00016.62
7.4.270.0030.00316.57
7.4.260.0030.00313.27
7.4.250.0040.00416.46
7.4.240.0040.00416.52
7.4.230.0040.00416.71
7.4.220.0170.00716.50
7.4.210.0080.00916.57
7.4.200.0000.00716.64
7.4.190.0030.00616.40
7.4.160.0080.00816.51
7.4.150.0100.00717.40
7.4.140.0100.00717.86
7.4.130.0060.01116.46
7.4.120.0160.00116.51
7.4.110.0140.00716.42
7.4.100.0040.01216.57
7.4.90.0140.00416.68
7.4.80.0060.01119.37
7.4.70.0120.00616.57
7.4.60.0040.01516.36
7.4.50.0030.00616.52
7.4.40.0060.00622.27
7.4.30.0150.00416.63
7.4.00.0030.00915.06
7.3.330.0000.00513.36
7.3.320.0050.00013.21
7.3.310.0070.00016.47
7.3.300.0060.00016.37
7.3.290.0060.00816.36
7.3.280.0080.00716.34
7.3.270.0120.00417.40
7.3.260.0100.00918.24
7.3.250.0120.01016.41
7.3.240.0080.00816.43
7.3.230.0120.00416.39
7.3.210.0190.00516.43
7.3.200.0100.00719.39
7.3.190.0070.01016.39
7.3.180.0000.01616.58
7.3.170.0080.00816.27
7.3.160.0120.00416.27
7.3.120.0030.01114.81
7.3.110.0060.01214.67
7.3.100.0150.00015.01
7.3.90.0030.00914.92
7.3.80.0100.00014.99
7.3.70.0000.01014.68
7.3.60.0000.01114.89
7.3.50.0090.00314.87
7.3.40.0030.01314.70
7.3.30.0060.00614.61
7.3.20.0030.01016.54
7.3.10.0070.00816.50
7.3.00.0030.01016.41
7.2.330.0070.01016.79
7.2.320.0100.00716.70
7.2.310.0130.00716.46
7.2.300.0110.00816.28
7.2.290.0120.00816.40
7.2.240.0060.01015.00
7.2.230.0030.01014.73
7.2.220.0100.00715.05
7.2.210.0090.00914.91
7.2.200.0070.00715.01
7.2.190.0070.01115.11
7.2.180.0070.00714.77
7.2.170.0070.00715.05
7.2.160.0100.00315.00
7.2.150.0070.01116.78
7.2.140.0100.00716.85
7.2.130.0020.00916.95
7.2.120.0030.00816.98
7.2.110.0040.00816.84
7.2.100.0050.00916.91
7.2.90.0050.00616.79
7.2.80.0060.00916.92
7.2.70.0070.00716.93
7.2.60.0040.01116.96
7.2.50.0080.00716.88
7.2.40.0060.00816.96
7.2.30.0060.00816.86
7.2.20.0060.00916.92
7.2.10.0050.00916.97
7.2.00.0020.00917.50
7.1.330.0080.00515.84
7.1.320.0070.00715.98
7.1.310.0000.01215.65
7.1.300.0090.00315.74
7.1.290.0070.00415.78
7.1.280.0030.01215.70
7.1.270.0080.00815.45
7.1.260.0040.01115.48
7.1.250.0040.01115.82
7.1.200.0030.00715.77
7.1.100.0070.00718.38
7.1.70.0080.00017.18
7.1.60.0090.01619.40
7.1.50.0190.00316.82
7.1.00.0000.04022.26
7.0.200.0030.00516.82
7.0.140.0000.07722.21
7.0.60.0100.04021.66
7.0.50.0030.07022.12
7.0.40.0000.09020.19
7.0.30.0070.08020.04
7.0.20.0030.09020.00
7.0.10.0070.07720.11
7.0.00.0030.07720.10
5.6.280.0070.07021.00
5.6.210.0100.05020.57
5.6.200.0030.04721.03
5.6.190.0030.07720.98
5.6.180.0030.08321.00
5.6.170.0070.07021.05
5.6.160.0030.08021.05
5.6.150.0070.08021.13
5.6.140.0000.07021.00
5.6.130.0030.08020.98
5.6.120.0100.08021.00
5.6.110.0070.08320.89
5.6.100.0100.07320.96
5.6.90.0130.08021.10
5.6.80.0000.08320.40
5.6.70.0100.05320.38
5.6.60.0170.04020.39
5.6.50.0200.03320.49
5.6.40.0130.04020.29
5.6.30.0170.03720.36
5.6.20.0100.03720.36
5.6.10.0200.04020.46
5.6.00.0070.04320.46
5.5.350.0030.07720.41
5.5.340.0070.07720.91
5.5.330.0100.07720.98
5.5.320.0030.08020.81
5.5.310.0130.07320.99
5.5.300.0030.08720.79
5.5.290.0030.08320.85
5.5.280.0070.06720.68
5.5.270.0100.08020.88
5.5.260.0030.08720.87
5.5.250.0100.07320.55
5.5.240.0070.07320.20
5.5.230.0100.04320.19
5.5.220.0070.04720.16
5.5.210.0200.03720.04
5.5.200.0200.03320.26
5.5.190.0170.02720.23
5.5.180.0130.03320.16
5.5.160.0070.04020.04
5.5.150.0100.03720.11
5.5.140.0130.04320.09
5.5.130.0030.04320.21
5.5.120.0100.03020.23
5.5.110.0030.04020.21
5.5.100.0030.03320.02
5.5.90.0030.03020.13
5.5.80.0100.02720.21
5.5.70.0030.03320.11
5.5.60.0030.03320.20
5.5.50.0070.03020.11
5.5.40.0070.02719.89
5.5.30.0030.03320.06
5.5.20.0000.03720.02
5.5.10.0030.03320.00
5.5.00.0000.04320.07
5.4.450.0000.08019.24
5.4.440.0030.07319.39
5.4.430.0070.07019.34
5.4.420.0000.07319.39
5.4.410.0030.08319.39
5.4.400.0100.06719.17
5.4.390.0230.03719.04
5.4.380.0100.04318.92
5.4.370.0200.03319.20
5.4.360.0130.04019.02
5.4.350.0100.04019.01
5.4.340.0200.02319.01
5.4.320.0130.04718.90
5.4.310.0100.02719.17
5.4.300.0130.03018.91
5.4.290.0070.03719.18
5.4.280.0100.03019.07
5.4.270.0070.03019.00
5.4.260.0070.03019.01
5.4.250.0030.03018.92
5.4.240.0030.03018.92
5.4.230.0000.03719.19
5.4.220.0030.03319.20
5.4.210.0000.03319.06
5.4.200.0030.03019.11
5.4.190.0070.02718.89
5.4.180.0030.04019.02
5.4.170.0000.04019.19
5.4.160.0000.03319.14
5.4.150.0000.03719.19
5.4.140.0070.06716.48
5.4.130.0000.04016.48
5.4.120.0030.07316.41
5.4.110.0070.07016.30
5.4.100.0130.03716.48
5.4.90.0070.04716.57
5.4.80.0200.05716.35
5.4.70.0070.05016.39
5.4.60.0130.06716.40
5.4.50.0030.06316.48
5.4.40.0030.07016.43
5.4.30.0100.06716.32
5.4.20.0000.05316.32
5.4.10.0030.07316.47
5.4.00.0000.07315.91
5.3.290.0070.03014.68
5.3.280.0030.03014.59
5.3.270.0030.03014.46
5.3.260.0030.04314.70
5.3.250.0030.04314.52
5.3.240.0000.07314.67
5.3.230.0070.05714.46
5.3.220.0100.07014.48
5.3.210.0100.05314.43
5.3.200.0000.08014.62
5.3.190.0030.07314.68
5.3.180.0070.07314.57
5.3.170.0030.07314.66
5.3.160.0030.07314.48
5.3.150.0030.07714.62
5.3.140.0030.07014.42
5.3.130.0030.08014.60
5.3.120.0100.05714.51
5.3.110.0000.08014.47
5.3.100.0030.06714.16
5.3.90.0070.05314.09
5.3.80.0000.06313.88
5.3.70.0030.06014.04
5.3.60.0070.04314.11
5.3.50.0000.04313.94
5.3.40.0000.07013.85
5.3.30.0030.06713.82
5.3.20.0070.07013.80
5.3.10.0070.07013.70
5.3.00.0000.04713.65
5.2.170.0000.04711.20
5.2.160.0030.04010.99
5.2.150.0070.05311.25
5.2.140.0100.05711.24
5.2.130.0000.05311.12
5.2.120.0030.06311.16
5.2.110.0030.03711.14
5.2.100.0000.04311.14
5.2.90.0000.06311.16
5.2.80.0000.05711.15
5.2.70.0030.04311.10
5.2.60.0070.05711.11
5.2.50.0030.06011.11
5.2.40.0030.05711.01
5.2.30.0030.06310.98
5.2.20.0000.06310.97
5.2.10.0070.04710.88
5.2.00.0030.06310.80
5.1.60.0030.03710.64
5.1.50.0000.03010.64
5.1.40.0070.04310.64
5.1.30.0070.05010.64
5.1.20.0000.05010.64
5.1.10.0030.05310.64
5.1.00.0030.04710.64
5.0.50.0070.04310.64
5.0.40.0030.04310.64
5.0.30.0000.06710.64
5.0.20.0000.04310.64
5.0.10.0000.04710.64
5.0.00.0030.06310.64
4.4.90.0000.03710.64
4.4.80.0030.03710.64
4.4.70.0030.02710.64
4.4.60.0030.03010.64
4.4.50.0100.02010.64
4.4.40.0000.04010.64
4.4.30.0030.03310.64
4.4.20.0000.03310.64
4.4.10.0000.03710.64
4.4.00.0030.05310.64
4.3.110.0030.03310.64
4.3.100.0030.03310.64
4.3.90.0000.03010.64
4.3.80.0030.05310.64
4.3.70.0000.03310.64
4.3.60.0000.03310.64
4.3.50.0000.03710.64
4.3.40.0030.04710.64
4.3.30.0000.03710.64
4.3.20.0000.04010.64
4.3.10.0030.03710.64
4.3.00.0100.03010.64

preferences:
57.82 ms | 401 KiB | 5 Q