3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Thing { private string $state; public function __construct() { $this->state = 'foo'; } public function __set(string $property, $value) : void { if ((\debug_backtrace()[1]['object'] ?? null) !== $this) { throw new \Exception('nope'); } $this->$property = $value; } } $thing = new Thing(); var_dump($thing); $thing->state = 'this should never be allowed';

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.5.00.0110.01320.36
8.4.150.0030.00014.05
8.4.140.0130.01017.67
8.4.130.0120.00818.12
8.4.120.0070.00520.70
8.4.110.0100.01018.55
8.4.100.0130.00718.09
8.4.90.0030.00620.50
8.4.80.0120.00419.05
8.4.70.0100.01218.96
8.4.60.0140.00919.06
8.4.50.0130.00718.72
8.4.40.0030.00619.53
8.4.30.0150.00620.24
8.4.20.0040.00418.89
8.4.10.0060.00917.90
8.3.280.0020.00114.05
8.3.270.0110.01016.86
8.3.260.0150.00416.53
8.3.250.0110.00917.16
8.3.240.0100.00916.48
8.3.230.0100.00816.77
8.3.220.0050.00318.97
8.3.210.0110.00416.70
8.3.200.0040.00516.99
8.3.190.0050.00317.29
8.3.180.0110.00719.07
8.3.170.0180.00316.68
8.3.160.0070.01118.93
8.3.150.0110.00718.75
8.3.140.0110.00718.85
8.3.130.0040.00418.62
8.3.120.0030.00618.78
8.3.110.0060.00316.75
8.3.100.0060.00320.66
8.3.90.0050.00316.69
8.3.80.0060.00318.68
8.3.70.0150.00416.63
8.3.60.0110.00718.56
8.3.50.0050.01116.57
8.3.40.0150.00418.92
8.3.30.0090.00618.92
8.3.20.0000.00721.77
8.3.10.0040.00423.48
8.3.00.0040.00422.39
8.2.290.0100.00918.77
8.2.280.0060.00418.35
8.2.270.0150.00022.21
8.2.260.0140.00416.91
8.2.250.0050.00516.75
8.2.240.0150.00619.09
8.2.230.0090.00020.94
8.2.220.0030.00624.06
8.2.210.0080.00026.77
8.2.200.0070.00316.88
8.2.190.0100.00717.00
8.2.180.0100.00718.41
8.2.170.0070.00719.12
8.2.160.0070.01022.96
8.2.150.0080.00424.18
8.2.140.0110.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00726.16
8.2.110.0070.00320.51
8.2.100.0100.00317.84
8.2.90.0040.00417.88
8.2.80.0090.00019.21
8.2.70.0030.00518.03
8.2.60.0060.00318.03
8.2.50.0040.00418.10
8.2.40.0080.00019.43
8.2.30.0040.00419.34
8.2.20.0040.00418.07
8.2.10.0040.00419.39
8.2.00.0050.00219.32
8.1.330.0100.00916.48
8.1.320.0080.01118.10
8.1.310.0180.00016.96
8.1.300.0050.00318.13
8.1.290.0000.00918.88
8.1.280.0080.00825.92
8.1.270.0000.00822.19
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.52
8.1.230.0080.00420.98
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0050.00617.35
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0080.00018.58
8.1.160.0050.00218.94
8.1.150.0050.00218.82
8.1.140.0030.00320.91
8.1.130.0040.00420.09
8.1.120.0040.00417.38
8.1.110.0000.00817.45
8.1.100.0000.00817.38
8.1.90.0030.00317.43
8.1.80.0040.00417.46
8.1.70.0070.00317.42
8.1.60.0040.00417.66
8.1.50.0060.00317.46
8.1.40.0050.00317.49
8.1.30.0000.00717.66
8.1.20.0000.00917.55
8.1.10.0080.00017.51
8.1.00.0040.00417.55
8.0.300.0000.00719.63
8.0.290.0100.00316.75
8.0.280.0000.00818.41
8.0.270.0000.00716.84
8.0.260.0030.00319.91
8.0.250.0000.00716.85
8.0.240.0040.00416.95
8.0.230.0000.00816.99
8.0.220.0070.00016.86
8.0.210.0030.00316.85
8.0.200.0000.00716.98
8.0.190.0030.00316.90
8.0.180.0000.00716.77
8.0.170.0030.00516.96
8.0.160.0030.00716.81
8.0.150.0040.00416.82
8.0.140.0040.00416.92
8.0.130.0030.00613.41
8.0.120.0050.00216.86
8.0.110.0000.00716.88
8.0.100.0050.00217.00
8.0.90.0040.00417.05
8.0.80.0090.00616.96
8.0.70.0000.00716.93
8.0.60.0040.00416.95
8.0.50.0040.00416.99
8.0.30.0120.00417.29
8.0.20.0190.00617.28
8.0.10.0030.00616.95
8.0.00.0110.00816.73
7.4.330.0050.00015.55
7.4.320.0060.00016.49
7.4.300.0030.00616.52
7.4.290.0000.00716.66
7.4.280.0030.00316.62
7.4.270.0000.00716.53
7.4.260.0000.00513.27
7.4.250.0000.00716.63
7.4.240.0060.00216.54
7.4.230.0030.00316.50
7.4.220.0020.00516.58
7.4.210.0080.00816.59
7.4.200.0030.00316.52
7.4.140.0130.01017.86
7.4.130.0110.00816.65
7.4.120.0120.00416.59
7.4.110.0100.00716.36
7.4.100.0100.01316.60
7.4.90.0090.00916.61
7.4.80.0130.00319.39
7.4.70.0100.00716.67
7.4.60.0080.00916.49
7.4.50.0070.00416.60
7.4.40.0120.00416.44
7.4.10.0000.01815.08
7.4.00.0110.00415.09
7.3.330.0000.00716.11
7.3.320.0000.00513.03
7.3.310.0000.00816.00
7.3.300.0030.00316.20
7.3.290.0030.00316.13
7.3.280.0150.00416.11
7.3.260.0080.00916.27
7.3.240.0060.01016.22
7.3.230.0150.00316.25
7.3.210.0110.00416.11
7.3.200.0130.00316.32
7.3.190.0040.01216.28
7.3.180.0070.01016.35
7.3.170.0060.01016.17
7.3.160.0110.00716.20
7.3.130.0100.01014.57
7.3.120.0160.00314.75
7.3.110.0110.00714.71
7.3.100.0030.01014.64
7.3.90.0080.00814.62
7.3.80.0060.00814.73
7.3.70.0080.00614.57
7.3.60.0070.00614.44
7.3.50.0070.00714.59
7.3.40.0070.00514.58
7.3.30.0100.00514.71
7.3.20.0020.01415.62
7.3.10.0080.00915.56
7.3.00.0090.00315.53
7.2.330.0080.00816.30
7.2.320.0100.00716.52
7.2.310.0130.00316.30
7.2.300.0050.01116.43
7.2.290.0070.00816.59
7.2.260.0130.00614.92
7.2.250.0100.00714.65
7.2.240.0070.00714.56
7.2.230.0090.00614.79
7.2.220.0060.01114.69
7.2.210.0060.01014.77
7.2.200.0080.00514.72
7.2.190.0060.01114.74
7.2.180.0040.01114.66
7.2.170.0050.00914.64
7.2.160.0100.00714.89
7.2.150.0080.01015.83
7.2.140.0040.01415.75
7.2.130.0110.00515.68
7.2.120.0110.00815.68
7.2.110.0030.01115.82
7.2.100.0090.00715.69
7.2.90.0050.00815.87
7.2.80.0070.00515.89
7.2.70.0090.00515.78
7.2.60.0050.01215.88
7.2.50.0070.00815.81
7.2.40.0090.00615.77
7.2.30.0030.01115.71
7.2.20.0080.00815.78
7.2.10.0030.01015.82
7.2.00.0040.01015.73
7.1.330.0000.01315.49
7.1.320.0030.01114.66
7.1.310.0150.00314.48
7.1.300.0020.00914.43
7.1.290.0090.00414.72
7.1.280.0050.00814.61
7.1.270.0050.01014.61
7.1.260.0030.01114.56
7.1.250.0080.00614.63
7.1.240.0030.00715.29
7.1.230.0060.00315.55
7.1.220.0060.00615.64
7.1.210.0070.00715.59
7.1.200.0030.00615.51
7.1.190.0090.00315.87
7.1.180.0040.01215.37
7.1.170.0040.00815.30
7.1.160.0070.00315.63
7.1.150.0060.00915.59
7.1.140.0040.00715.57
7.1.130.0060.00315.52
7.1.120.0040.00415.43
7.1.110.0090.00315.57
7.1.100.0030.01015.40
7.1.90.0030.01315.70
7.1.80.0100.00315.60
7.1.70.0060.01015.74
7.1.60.0030.01315.75
7.1.50.0000.01115.77
7.1.40.0040.00815.58
7.1.30.0060.01215.57
7.1.20.0090.00615.41
7.1.10.0060.00315.63
7.1.00.0060.00615.69

preferences:
219.09 ms | 403 KiB | 5 Q