3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Subject { private function __construct() {} public static function getFactory() { return new Factory(function() { new Subject(); }); } } final class Factory { private $callback; public function __construct(callable $callback) { $this->callback = $callback; } public function getProduct() { return call_user_func($this->callback); } } $factory = Subject::getFactory(); $subject = $factory->getProduct();

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.0120.00316.75
8.3.50.0150.00722.11
8.3.40.0070.01018.76
8.3.30.0100.00319.17
8.3.20.0000.00720.37
8.3.10.0070.00021.86
8.3.00.0040.00419.36
8.2.180.0070.01418.54
8.2.170.0090.00922.96
8.2.160.0100.00320.25
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.42
8.2.110.0060.00320.96
8.2.100.0130.00017.63
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0030.00618.04
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0000.00718.00
8.2.20.0000.00817.67
8.2.10.0000.00818.02
8.2.00.0000.00717.76
8.1.280.0160.00325.92
8.1.270.0030.00620.77
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0120.00424.02
8.1.230.0080.00418.85
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00517.13
8.1.180.0040.00418.10
8.1.170.0050.00320.38
8.1.160.0050.00322.03
8.1.150.0040.00418.77
8.1.140.0060.00317.52
8.1.130.0040.00417.83
8.1.120.0050.00217.39
8.1.110.0070.00017.49
8.1.100.0000.00817.43
8.1.90.0040.00417.33
8.1.80.0030.00417.32
8.1.70.0000.00717.42
8.1.60.0040.00417.57
8.1.50.0080.00017.42
8.1.40.0080.00017.45
8.1.30.0000.00817.63
8.1.20.0050.00317.55
8.1.10.0000.00717.60
8.1.00.0070.00017.59
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0030.00318.35
8.0.270.0040.00417.25
8.0.260.0030.00517.13
8.0.250.0000.00716.96
8.0.240.0000.00716.86
8.0.230.0000.00717.00
8.0.220.0000.00716.76
8.0.210.0040.00416.90
8.0.200.0070.00317.01
8.0.190.0040.00417.06
8.0.180.0000.00716.88
8.0.170.0030.00516.97
8.0.160.0000.00716.97
8.0.150.0030.00316.98
8.0.140.0030.00316.96
8.0.130.0050.00213.34
8.0.120.0050.00316.96
8.0.110.0070.00016.90
8.0.100.0000.00716.97
8.0.90.0040.00416.81
8.0.80.0070.01016.89
8.0.70.0070.00016.83
8.0.60.0000.00816.84
8.0.50.0030.00516.80
8.0.30.0150.00917.14
8.0.20.0120.01017.40
8.0.10.0070.00017.07
8.0.00.0130.01016.91
7.4.330.0000.00615.03
7.4.320.0000.00616.46
7.4.300.0030.00516.40
7.4.290.0030.00316.59
7.4.280.0040.00416.48
7.4.270.0070.00016.52
7.4.260.0000.00716.62
7.4.250.0000.00716.51
7.4.240.0030.00616.56
7.4.230.0070.00016.37
7.4.220.0110.00716.49
7.4.210.0030.01116.55
7.4.200.0040.00416.50
7.4.160.0090.00616.39
7.4.150.0080.01117.40
7.4.140.0110.00917.86
7.4.130.0130.00316.39
7.4.120.0080.00916.40
7.4.110.0160.01016.50
7.4.100.0160.00316.56
7.4.90.0060.01016.55
7.4.80.0060.01219.39
7.4.70.0110.00716.46
7.4.60.0060.01016.39
7.4.50.0000.00816.67
7.4.40.0030.01316.51
7.4.30.0060.01116.54
7.4.00.0080.00814.91
7.3.330.0000.00513.28
7.3.320.0110.00313.14
7.3.310.0000.00716.29
7.3.300.0000.00816.16
7.3.290.0030.00316.28
7.3.280.0070.01016.31
7.3.270.0170.00617.40
7.3.260.0090.00916.63
7.3.250.0060.01116.42
7.3.240.0060.01016.30
7.3.230.0130.00716.39
7.3.210.0140.00316.32
7.3.200.0100.00719.39
7.3.190.0110.00516.29
7.3.180.0080.00816.44
7.3.170.0090.01216.27
7.3.160.0120.00416.50
7.2.330.0100.00716.57
7.2.320.0060.01016.71
7.2.310.0100.00716.70
7.2.300.0120.00916.43
7.2.290.0030.01916.71
7.1.70.0000.01017.20
7.1.60.0070.01419.50
7.1.50.0070.01416.63
7.1.00.0100.07022.45
7.0.200.0070.00316.64
7.0.140.0030.06722.02
7.0.60.0170.07719.91
7.0.50.0000.09017.88
7.0.40.0070.08320.20
7.0.30.0270.07720.09
7.0.20.0400.05720.23
7.0.10.0270.08320.18
7.0.00.0070.08320.07
5.6.280.0000.07721.13
5.6.210.0030.04020.58
5.6.200.0100.08018.16
5.6.190.0070.07320.76
5.6.180.0270.07720.53
5.6.170.0230.04320.62
5.6.160.0070.04020.54
5.6.150.0070.03718.18
5.6.140.0070.03718.27
5.6.130.0100.04318.15
5.6.120.0170.07721.13
5.6.110.0100.08021.03
5.6.100.0030.05021.00
5.6.90.0000.07021.11
5.6.80.0100.08020.42
5.6.70.0270.07020.29
5.5.350.0130.05720.42
5.5.340.0000.04318.05
5.5.330.0030.08720.57
5.5.320.0030.09720.38
5.5.310.0230.03020.38
5.5.300.0030.05318.03
5.5.290.0030.08318.02
5.5.280.0030.08720.98
5.5.270.0070.08320.73
5.5.260.0030.04320.65
5.5.250.0070.08320.62
5.5.240.0030.04320.20
5.4.450.0130.06719.70
5.4.440.0830.06719.36
5.4.430.0870.06019.47
5.4.420.0800.04719.58
5.4.410.0470.06719.41
5.4.400.0400.04718.54
5.4.390.0430.04018.61
5.4.380.0330.07718.76
5.4.370.0370.07318.79
5.4.360.0370.04718.71
5.4.350.0400.05318.63
5.4.340.0270.05718.70
5.4.320.0370.05318.50
5.4.310.0370.05318.74
5.4.300.0300.06018.51
5.4.290.0330.05018.72
5.4.280.0400.04718.59
5.4.270.0300.06018.61
5.4.260.0430.04318.70
5.4.250.0230.06018.59
5.4.240.0230.06018.57
5.4.230.0430.04018.49
5.4.220.0300.05318.75
5.4.210.0270.05318.52
5.4.200.0300.05716.51
5.4.190.0330.06318.82
5.4.180.0330.04718.71
5.4.170.0300.05318.57
5.4.160.0230.06018.48
5.4.150.0300.05718.83
5.4.140.0400.04016.31
5.4.130.0370.04316.18
5.4.120.0300.05316.26
5.4.110.0400.04316.21
5.4.100.0270.05316.37
5.4.90.0330.04716.45
5.4.80.0370.04016.44
5.4.70.0330.05016.23
5.4.60.0330.06316.22
5.4.50.0270.05016.26
5.4.40.0400.04716.24
5.4.30.0270.05716.18
5.4.20.0270.06016.22
5.4.10.0200.05716.41
5.4.00.0230.05015.67
5.3.290.0400.04714.88
5.3.280.0200.05714.84
5.3.270.0230.06314.82
5.3.260.0300.05314.64
5.3.250.0330.06014.65
5.3.240.0370.07014.71
5.3.230.0370.04714.81
5.3.220.0300.06314.78
5.3.210.0300.05714.61
5.3.200.0330.06314.63
5.3.190.0430.04014.56
5.3.180.0300.05714.79
5.3.170.0330.04714.62
5.3.160.0370.05714.61
5.3.150.0330.05014.62
5.3.140.0300.05314.78
5.3.130.0230.07314.76
5.3.120.0400.04714.55
5.3.110.0370.04714.66
5.3.100.0470.05714.23
5.3.90.0500.06014.18
5.3.80.0270.06714.09
5.3.70.0330.04714.08
5.3.60.0270.05314.23
5.3.50.0370.05313.96
5.3.40.0370.04714.07
5.3.30.0200.05713.94
5.3.20.0330.05013.70
5.3.10.0230.05313.74
5.3.00.0330.05313.73
5.2.170.0170.05311.24
5.2.160.0300.03311.37
5.2.150.0330.03311.14
5.2.140.0170.05011.20
5.2.130.0130.05011.16
5.2.120.0330.05311.21
5.2.110.0200.04711.14
5.2.100.0200.06011.10
5.2.90.0200.04711.19
5.2.80.0300.04711.13
5.2.70.0270.04311.32
5.2.60.0230.04711.09
5.2.50.0200.04311.04
5.2.40.0170.04011.12
5.2.30.0200.04011.02
5.2.20.0200.04011.02
5.2.10.0300.03311.05
5.2.00.0300.04310.82
5.1.60.0230.03710.10
5.1.50.0270.04310.19
5.1.40.0170.03310.00
5.1.30.0170.03710.37
5.1.20.0170.04010.46
5.1.10.0170.03710.25
5.1.00.0130.04310.13
5.0.50.0030.0338.75
5.0.40.0170.0208.41
5.0.30.0170.0408.27
5.0.20.0170.0338.38
5.0.10.0100.0278.17
5.0.00.0070.0508.16
4.4.90.0130.0205.83
4.4.80.0130.0235.82
4.4.70.0070.0235.88
4.4.60.0130.0175.85
4.4.50.0170.0175.89
4.4.40.0100.0375.85
4.4.30.0070.0275.91
4.4.20.0130.0275.97
4.4.10.0100.0205.98
4.4.00.0030.0405.94
4.3.110.0100.0205.81
4.3.100.0030.0275.82
4.3.90.0100.0205.82
4.3.80.0070.0375.76
4.3.70.0200.0105.79
4.3.60.0100.0205.86
4.3.50.0130.0205.81
4.3.40.0100.0335.75
4.3.30.0000.0274.99
4.3.20.0070.0204.99
4.3.10.0070.0304.99
4.3.00.0130.0237.12

preferences:
60.72 ms | 401 KiB | 5 Q