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(Closure $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.0080.00816.49
8.3.50.0040.01118.15
8.3.40.0200.00018.57
8.3.30.0070.00718.97
8.3.20.0070.00020.16
8.3.10.0040.00421.76
8.3.00.0080.00019.38
8.2.180.0110.00718.54
8.2.170.0110.01122.96
8.2.160.0070.01020.51
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00419.44
8.2.110.0060.00320.86
8.2.100.0120.00017.63
8.2.90.0080.00019.09
8.2.80.0040.00417.97
8.2.70.0090.00017.61
8.2.60.0090.00018.03
8.2.50.0030.00618.07
8.2.40.0050.00319.68
8.2.30.0000.00718.02
8.2.20.0080.00017.57
8.2.10.0050.00218.00
8.2.00.0040.00417.68
8.1.280.0210.00025.92
8.1.270.0080.00020.46
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.98
8.1.230.0080.00418.91
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0030.00520.48
8.1.160.0040.00421.98
8.1.150.0000.00818.86
8.1.140.0040.00417.37
8.1.130.0000.00717.80
8.1.120.0040.00417.37
8.1.110.0040.00417.30
8.1.100.0050.00317.40
8.1.90.0040.00417.48
8.1.80.0040.00417.47
8.1.70.0030.00517.46
8.1.60.0040.00417.59
8.1.50.0030.00617.60
8.1.40.0040.00417.53
8.1.30.0000.00817.57
8.1.20.0000.00817.70
8.1.10.0000.00717.53
8.1.00.0070.00017.37
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.43
8.0.270.0000.00817.19
8.0.260.0040.00417.21
8.0.250.0030.00316.96
8.0.240.0060.00016.99
8.0.230.0070.00016.92
8.0.220.0070.00016.95
8.0.210.0040.00416.94
8.0.200.0060.00317.02
8.0.190.0040.00417.01
8.0.180.0000.00716.99
8.0.170.0030.00516.88
8.0.160.0070.00017.04
8.0.150.0000.00716.96
8.0.140.0070.00016.93
8.0.130.0030.00313.38
8.0.120.0000.00916.82
8.0.110.0000.00716.85
8.0.100.0000.00716.96
8.0.90.0000.00717.00
8.0.80.0080.00816.87
8.0.70.0040.00416.99
8.0.60.0020.00516.94
8.0.50.0040.00416.90
8.0.30.0080.01417.19
8.0.20.0100.01417.40
8.0.10.0040.00417.10
8.0.00.0120.00916.74
7.4.330.0020.00215.03
7.4.320.0000.00716.66
7.4.300.0000.00716.49
7.4.290.0040.00416.64
7.4.280.0070.00016.46
7.4.270.0000.00716.52
7.4.260.0030.00316.51
7.4.250.0040.00416.41
7.4.240.0060.00216.60
7.4.230.0000.00716.40
7.4.220.0070.01416.55
7.4.210.0110.00516.64
7.4.200.0040.00416.49
7.4.160.0120.00416.67
7.4.150.0150.00317.40
7.4.140.0110.00717.86
7.4.130.0130.00316.49
7.4.120.0100.00716.50
7.4.110.0090.00916.36
7.4.100.0180.00016.57
7.4.90.0140.00316.30
7.4.80.0070.01419.39
7.4.70.0110.00516.61
7.4.60.0030.01316.44
7.4.50.0030.00516.41
7.4.40.0060.01116.61
7.4.30.0030.01916.41
7.4.00.0050.01114.87
7.3.330.0000.00513.12
7.3.320.0060.00613.23
7.3.310.0070.00016.20
7.3.300.0070.00016.32
7.3.290.0000.00616.08
7.3.280.0080.01016.28
7.3.270.0140.00617.40
7.3.260.0100.00716.35
7.3.250.0090.00816.42
7.3.240.0040.01116.28
7.3.230.0170.00616.39
7.3.210.0100.00616.28
7.3.200.0030.01419.39
7.3.190.0130.00316.41
7.3.180.0030.01316.59
7.3.170.0160.00316.28
7.3.160.0060.01016.51
7.3.120.0060.01214.85
7.3.110.0070.01014.70
7.3.100.0090.00914.68
7.3.90.0090.00614.64
7.3.80.0040.01514.81
7.3.70.0000.01414.67
7.3.60.0040.00814.82
7.3.50.0030.01314.89
7.3.40.0100.00014.88
7.3.30.0000.01214.71
7.3.20.0090.00616.62
7.3.10.0100.00316.89
7.3.00.0000.01416.30
7.2.330.0130.00616.43
7.2.320.0090.00616.31
7.2.310.0070.01016.64
7.2.300.0120.00616.45
7.2.290.0100.01316.69
7.2.250.0090.00915.00
7.2.240.0030.01515.23
7.2.230.0000.01814.64
7.2.220.0070.00714.56
7.2.210.0060.01315.16
7.2.200.0100.00714.89
7.2.190.0120.00315.01
7.2.180.0070.00314.81
7.2.170.0000.01014.93
7.2.00.0060.01019.14
7.1.330.0040.01115.67
7.1.320.0140.00015.89
7.1.310.0070.01015.78
7.1.300.0070.00715.56
7.1.290.0000.01015.80
7.1.280.0100.00315.67
7.1.270.0150.00015.75
7.1.260.0090.00615.66
7.1.200.0040.01115.81
7.1.100.0130.00318.08
7.1.70.0030.01016.87
7.1.60.0130.01319.50
7.1.50.0090.01316.84
7.1.00.0070.07722.30
7.0.200.0040.00416.64
7.0.140.0070.07021.98
7.0.60.0130.04719.99
7.0.50.0170.07317.79
7.0.40.0130.04720.14
7.0.30.0400.07020.16
7.0.20.0270.05320.09
7.0.10.0200.08720.06
7.0.00.0030.05720.12
5.6.280.0030.07321.07
5.6.210.0130.05320.64
5.6.200.0170.07018.23
5.6.190.0000.04720.57
5.6.180.0230.05020.42
5.6.170.0300.08020.44
5.6.160.0170.04720.51
5.6.150.0000.04318.22
5.6.140.0070.05318.14
5.6.130.0070.04718.23
5.6.120.0100.04020.89
5.6.110.0100.08021.14
5.6.100.0130.08020.89
5.6.90.0000.04320.89
5.6.80.0030.05320.45
5.6.70.0170.08020.50
5.5.350.0100.08720.44
5.5.340.0070.08018.07
5.5.330.0100.05320.36
5.5.320.0100.08020.47
5.5.310.0270.08020.27
5.5.300.0100.07717.98
5.5.290.0170.07317.98
5.5.280.0130.04320.95
5.5.270.0000.05320.90
5.5.260.0030.04320.68
5.5.250.0030.09020.69
5.5.240.0100.03720.05
5.4.450.0170.05319.21
5.4.440.0800.06019.34
5.4.430.0900.05319.45
5.4.420.0930.05019.16
5.4.410.0100.05719.57
5.4.400.0330.05018.65
5.4.390.0530.05318.57
5.4.380.0270.06018.61
5.4.370.0430.06018.75
5.4.360.0300.05018.59
5.4.350.0300.06018.50
5.4.340.0370.05018.48
5.4.320.0300.05318.83
5.4.310.0300.05718.50
5.4.300.0400.06718.63
5.4.290.0370.05018.70
5.4.280.0300.05318.76
5.4.270.0270.05718.73
5.4.260.0400.04318.61
5.4.250.0370.05018.56
5.4.240.0300.05318.70
5.4.230.0400.04018.73
5.4.220.0270.05318.58
5.4.210.0300.05018.48
5.4.200.0300.05016.79
5.4.190.0330.05018.79
5.4.180.0270.06018.55
5.4.170.0300.05718.77
5.4.160.0270.06718.73
5.4.150.0300.05018.61
5.4.140.0300.05016.47
5.4.130.0330.04316.23
5.4.120.0300.05316.28
5.4.110.0330.04316.33
5.4.100.0300.05316.29
5.4.90.0330.05016.18
5.4.80.0200.06016.18
5.4.70.0300.05016.31
5.4.60.0300.05016.14
5.4.50.0400.04016.20
5.4.40.0300.06716.30
5.4.30.0230.06016.23
5.4.20.0370.04316.23
5.4.10.0300.05316.29
5.4.00.0270.05315.77
5.3.290.0200.06314.88
5.3.280.0330.05314.59
5.3.270.0230.06014.67
5.3.260.0270.05714.75
5.3.250.0300.05714.66
5.3.240.0230.06314.70
5.3.230.0230.07014.65
5.3.220.0270.05714.68
5.3.210.0300.05714.68
5.3.200.0300.05014.56
5.3.190.0270.05314.76
5.3.180.0300.07014.57
5.3.170.0430.04014.78
5.3.160.0230.07014.55
5.3.150.0300.06714.61
5.3.140.0330.04714.58
5.3.130.0400.05014.73
5.3.120.0300.05314.62
5.3.110.0200.06314.57
5.3.100.0230.05714.10
5.3.90.0270.05314.05
5.3.80.0230.06014.07
5.3.70.0200.05714.14
5.3.60.0200.05714.00
5.3.50.0300.05714.09
5.3.40.0300.06314.13
5.3.30.0330.04313.96
5.3.20.0300.04713.73
5.3.10.0430.05713.74
5.3.00.0400.06013.68
5.2.170.0270.03711.27
5.2.160.0270.03711.37
5.2.150.0200.04311.25
5.2.140.0300.03711.12
5.2.130.0300.04711.22
5.2.120.0170.04711.10
5.2.110.0200.04311.15
5.2.100.0170.04711.23
5.2.90.0200.04711.21
5.2.80.0300.03311.15
5.2.70.0200.05311.08
5.2.60.0230.04311.04
5.2.50.0330.05011.12
5.2.40.0230.04011.04
5.2.30.0270.03311.02
5.2.20.0230.03711.01
5.2.10.0200.03710.91
5.2.00.0170.04310.82
5.1.60.0230.02710.02
5.1.50.0200.03710.02
5.1.40.0130.04010.05
5.1.30.0170.04010.38
5.1.20.0200.03710.46
5.1.10.0130.04010.07
5.1.00.0200.03310.13
5.0.50.0130.0278.65
5.0.40.0100.0278.57
5.0.30.0100.0438.35
5.0.20.0100.0278.42
5.0.10.0130.0278.32
5.0.00.0070.0508.34
4.4.90.0070.0275.91
4.4.80.0070.0275.90
4.4.70.0100.0235.89
4.4.60.0070.0305.87
4.4.50.0070.0275.91
4.4.40.0130.0375.91
4.4.30.0030.0275.89
4.4.20.0100.0205.96
4.4.10.0130.0305.96
4.4.00.0100.0405.93
4.3.110.0200.0205.84
4.3.100.0070.0305.82
4.3.90.0130.0175.79
4.3.80.0100.0375.80
4.3.70.0100.0275.91
4.3.60.0170.0175.87
4.3.50.0100.0235.81
4.3.40.0100.0375.75
4.3.30.0030.0234.99
4.3.20.0030.0304.99
4.3.10.0130.0234.99
4.3.00.0030.0207.12

preferences:
56.39 ms | 400 KiB | 5 Q