3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $x; public function __construct($x) { $this->x = 2*$x; } private static function a($xs, $m) { return array_map(function($x) use ($m) { return new self($x*$m); }, $xs); } public static function b($xs) { return self::a($xs, 10); } } var_dump(Foo::b(array(1,2,3)));

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.0180.00318.55
8.3.50.0130.00721.27
8.3.40.0090.00618.84
8.3.30.0160.00019.04
8.3.20.0140.00020.34
8.3.10.0080.00020.56
8.3.00.0080.00019.26
8.2.180.0140.00718.41
8.2.170.0070.01422.96
8.2.160.0070.00720.32
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0020.00522.12
8.2.110.0060.00321.13
8.2.100.0090.00317.78
8.2.90.0050.00317.84
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0040.00417.92
8.2.50.0040.00418.07
8.2.40.0000.00719.82
8.2.30.0060.00617.95
8.2.20.0080.00017.67
8.2.10.0000.00818.09
8.2.00.0040.00417.63
8.1.280.0070.01025.92
8.1.270.0040.00423.97
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0000.01121.95
8.1.230.0050.00520.84
8.1.220.0030.00517.74
8.1.210.0070.00318.97
8.1.200.0060.00317.23
8.1.190.0000.00817.22
8.1.180.0080.00018.10
8.1.170.0040.00418.64
8.1.160.0050.00221.95
8.1.150.0040.00418.71
8.1.140.0000.00717.37
8.1.130.0050.00317.84
8.1.120.0040.00417.32
8.1.110.0000.00717.46
8.1.100.0040.00417.46
8.1.90.0030.00517.40
8.1.80.0030.00617.40
8.1.70.0030.00317.46
8.1.60.0080.00017.64
8.1.50.0040.00417.41
8.1.40.0000.00817.44
8.1.30.0080.00017.51
8.1.20.0050.00217.57
8.1.10.0050.00217.54
8.1.00.0040.00817.53
8.0.300.0000.00719.85
8.0.290.0080.00016.75
8.0.280.0070.00018.44
8.0.270.0030.00317.14
8.0.260.0000.00617.17
8.0.250.0000.00716.90
8.0.240.0040.00416.85
8.0.230.0030.00316.98
8.0.220.0040.00416.93
8.0.210.0060.00016.92
8.0.200.0040.00416.85
8.0.190.0030.00316.85
8.0.180.0000.00716.89
8.0.170.0080.00016.91
8.0.160.0040.00416.92
8.0.150.0000.00716.73
8.0.140.0040.00416.75
8.0.130.0000.00613.32
8.0.120.0080.00016.76
8.0.110.0040.00416.86
8.0.100.0070.00016.68
8.0.90.0050.00316.72
8.0.80.0070.01016.86
8.0.70.0000.00716.81
8.0.60.0030.00516.88
8.0.50.0040.00416.92
8.0.30.0110.00917.04
8.0.20.0130.00917.40
8.0.10.0050.00217.01
8.0.00.0120.00616.89
7.4.330.0050.00015.21
7.4.320.0030.00316.37
7.4.300.0030.00316.40
7.4.290.0000.00716.64
7.4.280.0080.00016.60
7.4.270.0000.00716.51
7.4.260.0030.00516.39
7.4.250.0040.00416.52
7.4.240.0030.00316.62
7.4.230.0040.00416.65
7.4.220.0090.00916.56
7.4.210.0120.00316.41
7.4.200.0030.00316.35
7.4.160.0080.00816.38
7.4.150.0080.01017.40
7.4.140.0110.00817.86
7.4.130.0110.01016.53
7.4.120.0140.00416.55
7.4.110.0080.00816.58
7.4.100.0170.00016.58
7.4.90.0080.01116.48
7.4.80.0110.00719.39
7.4.70.0130.00316.41
7.4.60.0030.01516.55
7.4.50.0000.00916.44
7.4.40.0100.00616.67
7.4.30.0110.00616.62
7.4.00.0100.00814.76
7.3.330.0060.00013.33
7.3.320.0000.00513.27
7.3.310.0030.00316.20
7.3.300.0050.00216.36
7.3.290.0060.01116.34
7.3.280.0090.00816.25
7.3.270.0100.01417.40
7.3.260.0090.00916.46
7.3.250.0140.00316.26
7.3.240.0090.00816.58
7.3.230.0060.01116.57
7.3.210.0100.00716.43
7.3.200.0110.00719.39
7.3.190.0060.01016.46
7.3.180.0060.01216.52
7.3.170.0040.01216.52
7.3.160.0030.01216.39
7.3.120.0100.00714.72
7.3.110.0140.00414.48
7.3.100.0060.00914.46
7.3.90.0060.01015.02
7.3.80.0080.00614.98
7.3.70.0070.00714.89
7.3.60.0090.00614.80
7.3.50.0060.00614.64
7.3.40.0090.00414.70
7.3.30.0060.00314.83
7.3.20.0040.01216.67
7.3.10.0140.00016.65
7.3.00.0070.00716.76
7.2.330.0140.01016.72
7.2.320.0030.01316.34
7.2.310.0060.01216.43
7.2.300.0140.00616.44
7.2.290.0090.01616.73
7.2.250.0070.01314.90
7.2.240.0100.01015.28
7.2.230.0070.01015.04
7.2.220.0040.00814.83
7.2.210.0000.00914.95
7.2.200.0070.00715.01
7.2.190.0000.01314.77
7.2.180.0090.00614.98
7.2.170.0000.01414.76
7.1.330.0030.01015.77
7.1.320.0040.00815.91
7.1.310.0030.01115.59
7.1.300.0030.01015.77
7.1.290.0090.00615.60
7.1.280.0000.01115.85
7.1.270.0100.00615.85
7.1.260.0060.00615.60
7.1.100.0040.00718.13
7.1.70.0020.00516.93
7.1.60.0140.01119.32
7.1.50.0030.01417.01
7.1.00.0070.07022.44
7.0.200.0060.00316.80
7.0.140.0030.07022.09
7.0.60.0030.09019.84
7.0.50.0030.05017.86
7.0.40.0030.04719.96
7.0.30.0330.05020.24
7.0.20.0300.07020.09
7.0.10.0030.04320.10
7.0.00.0130.05320.14
5.6.280.0030.07321.13
5.6.210.0170.06720.52
5.6.200.0070.06318.19
5.6.190.0070.05720.34
5.6.180.0500.08020.33
5.6.170.0330.05020.51
5.6.160.0030.09020.61
5.6.150.0070.04018.18
5.6.140.0030.08718.14
5.6.130.0070.05318.13
5.6.120.0170.07020.89
5.6.110.0100.08021.00
5.6.100.0170.07721.15
5.6.90.0030.05021.13
5.6.80.0170.07020.42
5.5.350.0130.05320.46
5.5.340.0170.06718.07
5.5.330.0070.07720.27
5.5.320.0230.08020.31
5.5.310.0270.04720.28
5.5.300.0130.07317.92
5.5.290.0170.04318.07
5.5.280.0070.08320.79
5.5.270.0130.08020.76
5.5.260.0100.08320.77
5.5.250.0070.05020.61
5.5.240.0070.05020.06
5.4.450.0300.07319.49
5.4.440.0200.05019.39
5.4.430.0270.04319.18
5.4.420.0270.06019.30
5.4.410.0200.04019.07
5.4.400.0200.06019.22
5.4.390.0230.05718.87
5.4.380.0330.05018.98
5.4.370.0200.05018.95
5.4.360.0200.08019.31
5.4.350.0230.07019.06
5.4.340.0270.06019.20
5.4.320.0130.04318.99
5.4.310.0270.05319.14
5.4.300.0200.07719.31
5.4.290.0130.04319.25
5.4.280.0200.05718.95
5.4.270.0130.04019.08
5.4.260.0200.03318.85
5.4.250.0130.03719.09
5.4.240.0200.03018.97
5.4.230.0200.03019.14
5.4.220.0100.04018.85
5.4.210.0130.03719.09
5.4.200.0130.04719.09
5.4.190.0100.04018.97
5.4.180.0200.03719.07
5.4.170.0100.04318.84
5.4.160.0170.03319.13
5.4.150.0130.04318.93
5.4.140.0130.04016.38
5.4.130.0130.03016.45
5.4.120.0130.04716.39
5.4.110.0200.03316.51
5.4.100.0200.03716.40
5.4.90.0100.04316.56
5.4.80.0130.03716.48
5.4.70.0200.04716.29
5.4.60.0130.03316.43
5.4.50.0170.03316.53
5.4.40.0170.04016.51
5.4.30.0200.04316.53
5.4.20.0230.03016.25
5.4.10.0170.07316.53
5.4.00.0230.05715.83
5.3.290.0230.05714.59
5.3.280.0100.03714.61
5.3.270.0170.04014.78
5.3.260.0170.04014.61
5.3.250.0100.04314.62
5.3.240.0100.04014.62
5.3.230.0170.03314.54
5.3.220.0170.03314.57
5.3.210.0130.03714.50
5.3.200.0130.03714.48
5.3.190.0130.03714.80
5.3.180.0070.04714.62
5.3.170.0070.04014.63
5.3.160.0130.03314.50
5.3.150.0170.03314.48
5.3.140.0130.03314.64
5.3.130.0100.03714.48
5.3.120.0200.03014.61
5.3.110.0300.03714.46
5.3.100.0230.06014.13
5.3.90.0270.06714.03
5.3.80.0230.07014.08
5.3.70.0230.07013.94
5.3.60.0170.04313.93
5.3.50.0100.06014.04
5.3.40.0200.05014.02
5.3.30.0330.04313.93
5.3.20.0170.07713.62
5.3.10.0170.07713.59
5.3.00.0230.06713.70
5.2.170.0100.03311.98
5.2.160.0170.06011.98
5.2.150.0200.04711.98
5.2.140.0170.03311.98
5.2.130.0170.03711.98
5.2.120.0270.05011.98
5.2.110.0200.05011.98
5.2.100.0230.05711.98
5.2.90.0200.03311.98
5.2.80.0230.04311.98
5.2.70.0230.04711.98
5.2.60.0270.05011.98
5.2.50.0130.06011.98
5.2.40.0170.05011.98
5.2.30.0170.03311.98
5.2.20.0200.05711.98
5.2.10.0200.04711.98
5.2.00.0300.04311.98
5.1.60.0200.05311.98
5.1.50.0170.05311.98
5.1.40.0130.05011.98
5.1.30.0170.03711.98
5.1.20.0170.05711.98
5.1.10.0130.05311.98
5.1.00.0170.04711.98
5.0.50.0170.04011.98
5.0.40.0170.03711.98
5.0.30.0070.04011.98
5.0.20.0070.02711.98
5.0.10.0070.02711.98
5.0.00.0030.05011.98
4.4.90.0100.03311.98
4.4.80.0070.03311.98
4.4.70.0070.01711.98
4.4.60.0100.03011.98
4.4.50.0100.02711.98
4.4.40.0030.04311.98
4.4.30.0070.03711.98
4.4.20.0070.03311.98
4.4.10.0070.01711.98
4.4.00.0070.06011.98
4.3.110.0070.03011.98
4.3.100.0100.01311.98
4.3.90.0070.03311.98
4.3.80.0070.04011.98
4.3.70.0100.01711.98
4.3.60.0070.02011.98
4.3.50.0100.01711.98
4.3.40.0030.03711.98
4.3.30.0030.02311.98
4.3.20.0070.03711.98
4.3.10.0000.02311.98
4.3.00.0000.04011.98

preferences:
43.61 ms | 401 KiB | 5 Q