3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; public function __construct() { $this->bar = function() { print "this is in bar"; }; } } $foo = new Foo(); ($foo->bar)();

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.0090.00916.88
8.3.50.0070.00921.99
8.3.40.0110.00418.97
8.3.30.0100.00319.07
8.3.20.0080.00020.29
8.3.10.0040.00423.48
8.3.00.0000.00819.56
8.2.180.0040.01116.38
8.2.170.0110.00722.96
8.2.160.0100.00320.53
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.48
8.2.110.0090.00022.24
8.2.100.0090.00317.86
8.2.90.0000.00719.17
8.2.80.0080.00017.97
8.2.70.0030.00617.63
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0090.00019.94
8.2.30.0000.00718.16
8.2.20.0070.00017.67
8.2.10.0040.00418.12
8.2.00.0000.00817.56
8.1.280.0120.00625.92
8.1.270.0040.00423.91
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0130.00318.90
8.1.230.0000.01119.12
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0050.00517.35
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0030.00518.66
8.1.160.0000.00721.93
8.1.150.0040.00418.63
8.1.140.0070.00017.41
8.1.130.0030.00317.80
8.1.120.0030.00517.46
8.1.110.0060.00317.45
8.1.100.0070.00017.44
8.1.90.0030.00517.39
8.1.80.0030.00617.44
8.1.70.0070.00017.42
8.1.60.0040.00717.60
8.1.50.0050.00317.57
8.1.40.0050.00217.50
8.1.30.0000.00817.54
8.1.20.0040.00417.55
8.1.10.0040.00417.53
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0040.00418.48
8.0.270.0040.00417.21
8.0.260.0000.00617.25
8.0.250.0030.00316.88
8.0.240.0050.00516.88
8.0.230.0070.00016.84
8.0.220.0040.00416.78
8.0.210.0000.00816.71
8.0.200.0060.00016.99
8.0.190.0050.00216.97
8.0.180.0030.00316.93
8.0.170.0050.00216.84
8.0.160.0070.00016.91
8.0.150.0090.00016.90
8.0.140.0030.00716.90
8.0.130.0060.00013.30
8.0.120.0030.00516.77
8.0.110.0040.00416.78
8.0.100.0040.00416.74
8.0.90.0000.00716.88
8.0.80.0060.01416.77
8.0.70.0050.00316.86
8.0.60.0040.00416.68
8.0.50.0050.00316.66
8.0.30.0090.00916.87
8.0.20.0110.00917.40
8.0.10.0000.00816.88
8.0.00.0080.00916.94
7.4.330.0000.00615.00
7.4.320.0060.00316.53
7.4.300.0000.00616.63
7.4.290.0040.00416.60
7.4.280.0000.00716.66
7.4.270.0030.00316.52
7.4.260.0000.00716.42
7.4.250.0030.00416.46
7.4.240.0040.00316.50
7.4.230.0040.00416.41
7.4.220.0090.00916.70
7.4.210.0060.00916.66
7.4.200.0000.00716.61
7.4.160.0080.00816.56
7.4.150.0030.01417.40
7.4.140.0110.00817.86
7.4.130.0090.01116.41
7.4.120.0080.01016.61
7.4.110.0060.00916.31
7.4.100.0130.01016.66
7.4.90.0080.00816.46
7.4.80.0090.01119.39
7.4.70.0120.00616.52
7.4.60.0030.01416.44
7.4.50.0020.00216.17
7.4.40.0030.01316.22
7.4.30.0000.01516.68
7.4.00.0090.00714.95
7.3.330.0050.00013.35
7.3.320.0000.00513.28
7.3.310.0030.00316.36
7.3.300.0000.00716.26
7.3.290.0070.00716.31
7.3.280.0090.00816.28
7.3.270.0060.01017.40
7.3.260.0100.01316.46
7.3.250.0110.00616.58
7.3.240.0060.01416.35
7.3.230.0070.01016.43
7.3.210.0130.00316.43
7.3.200.0090.00619.39
7.3.190.0100.01216.46
7.3.180.0140.00316.46
7.3.170.0190.00616.50
7.3.160.0060.00916.46
7.3.120.0070.00914.88
7.3.110.0070.01014.82
7.3.100.0040.00415.06
7.3.90.0040.00814.96
7.3.80.0040.00414.86
7.3.70.0000.01514.53
7.3.60.0000.00914.79
7.3.50.0070.00714.77
7.3.40.0060.00614.46
7.3.30.0000.01414.78
7.3.20.0060.00616.45
7.3.10.0060.01016.53
7.3.00.0090.00716.71
7.2.330.0110.00716.80
7.2.320.0140.00716.41
7.2.310.0140.00416.77
7.2.300.0030.01316.58
7.2.290.0060.01016.51
7.2.250.0070.01114.81
7.2.240.0140.00714.78
7.2.230.0000.01915.13
7.2.220.0030.01215.16
7.2.210.0060.00615.08
7.2.200.0070.01014.98
7.2.190.0030.01014.80
7.2.180.0130.00315.02
7.2.170.0030.01315.04
7.2.130.0070.01016.95
7.2.120.0130.01016.52
7.2.110.0100.00616.63
7.2.100.0090.00916.54
7.2.90.0030.01116.61
7.2.80.0130.01016.78
7.2.70.0100.00317.03
7.2.60.0070.00916.65
7.2.50.0090.00716.88
7.2.40.0140.00316.72
7.2.30.0130.00616.54
7.2.20.0150.00616.28
7.2.10.0130.00716.59
7.2.00.0060.00818.06
7.1.330.0070.00715.55
7.1.320.0000.01415.55
7.1.310.0060.00615.67
7.1.300.0000.01115.45
7.1.290.0000.01215.65
7.1.280.0070.01015.83
7.1.270.0030.00615.76
7.1.260.0070.00315.93
7.1.250.0130.00015.66
7.1.200.0080.00415.58
7.1.70.0040.00417.03
7.1.60.0030.01019.70
7.1.50.0040.01816.86
7.1.00.0030.07722.30
7.0.200.0060.01016.72
7.0.140.0000.07322.00
7.0.60.0070.04319.89
7.0.50.0030.04017.83
7.0.40.0130.08020.25
7.0.30.0330.03720.16
7.0.20.0430.07020.08
7.0.10.0030.09320.09
7.0.00.0100.04720.15
5.6.280.0030.07321.11
5.6.210.0070.08020.70
5.6.200.0070.03718.15
5.6.190.0070.08020.52
5.6.180.0130.06720.48
5.6.170.0230.07720.44
5.6.160.0070.03720.55
5.6.150.0070.03718.16
5.6.140.0130.06318.16
5.6.130.0070.05718.17
5.6.120.0070.05720.95
5.6.110.0030.05321.00
5.6.100.0070.07021.12
5.6.90.0070.08321.09
5.6.80.0030.03720.29
5.5.350.0030.07320.44
5.5.340.0100.07717.98
5.5.330.0170.07320.25
5.5.320.0070.06320.33
5.5.310.0330.05720.19
5.5.300.0000.04318.04
5.5.290.0030.06318.06
5.5.280.0070.08320.78
5.5.270.0000.05320.83
5.5.260.0200.07020.80
5.5.250.0100.05020.55
5.5.240.0270.06720.24
5.4.450.0600.04743.87
5.4.440.0170.04743.79
5.4.430.0200.04343.77
5.4.420.0300.03343.77
5.4.410.0370.04343.77
5.4.400.0370.04043.76
5.4.390.0600.03343.74
5.4.380.0170.05318.77
5.4.370.0130.05318.61
5.4.360.0100.05718.77
5.4.350.0170.05318.74
5.4.340.0170.05018.68
5.4.320.0070.03612.52
5.4.310.0040.04012.52
5.4.300.0070.04412.52
5.4.290.0040.03912.52
5.4.280.0080.04112.41
5.4.270.0070.04212.41
5.4.260.0060.03712.41
5.4.250.0040.04012.41
5.4.240.0070.04012.41
5.4.230.0050.05212.41
5.4.220.0080.04912.40
5.4.210.0090.03612.41
5.4.200.0080.04012.41
5.4.190.0060.03612.40
5.4.180.0100.03712.40
5.4.170.0070.04112.41
5.4.160.0050.03712.41
5.4.150.0060.03512.40
5.4.140.0060.03612.09
5.4.130.0050.03612.07
5.4.120.0080.04512.04
5.4.110.0120.03612.04
5.4.100.0050.03512.04
5.4.90.0060.03612.04
5.4.80.0080.04412.04
5.4.70.0060.03512.03
5.4.60.0040.03712.03
5.4.50.0060.03512.04
5.4.40.0060.03412.02
5.4.30.0050.03612.01
5.4.20.0030.03712.01
5.4.10.0080.03812.02
5.4.00.0050.03611.51
5.3.290.0100.03512.80
5.3.280.0050.03712.71
5.3.270.0090.04912.73
5.3.260.0080.04212.72
5.3.250.0110.04212.72
5.3.240.0080.05312.72
5.3.230.0070.04612.70
5.3.220.0070.03612.68
5.3.210.0070.03712.68
5.3.200.0090.03312.68
5.3.190.0060.04012.68
5.3.180.0080.03612.67
5.3.170.0060.03712.67
5.3.160.0090.03812.67
5.3.150.0070.04212.67
5.3.140.0050.03812.66
5.3.130.0060.03912.66
5.3.120.0090.04612.66
5.3.110.0050.03912.66
5.3.100.0110.04312.13
5.3.90.0030.04512.11
5.3.80.0020.03912.10
5.3.70.0050.03712.10
5.3.60.0090.05112.09
5.3.50.0100.04712.04
5.3.40.0060.05612.03
5.3.30.0080.03811.99
5.3.20.0090.04411.77
5.3.10.0070.04011.74
5.3.00.0090.03911.72
5.2.170.0040.0339.23
5.2.160.0070.0279.22
5.2.150.0010.0349.22
5.2.140.0030.0329.22
5.2.130.0030.0329.18
5.2.120.0070.0269.18
5.2.110.0010.0319.18
5.2.100.0040.0369.18
5.2.90.0060.0369.18
5.2.80.0050.0339.18
5.2.70.0090.0279.17
5.2.60.0020.0349.13
5.2.50.0050.0309.10
5.2.40.0060.0269.07
5.2.30.0060.0289.05
5.2.20.0060.0279.04
5.2.10.0100.0228.94
5.2.00.0020.0318.80
5.1.60.0040.0288.09
5.1.50.0040.0308.08
5.1.40.0050.0328.07
5.1.30.0030.0288.42
5.1.20.0060.0248.44
5.1.10.0030.0268.16
5.1.00.0040.0418.16
5.0.50.0050.0286.64
5.0.40.0020.0206.50
5.0.30.0030.0306.32
5.0.20.0050.0176.28
5.0.10.0030.0276.25
5.0.00.0040.0396.25
4.4.90.0040.0134.78
4.4.80.0040.0224.75
4.4.70.0020.0154.75
4.4.60.0020.0154.75
4.4.50.0030.0244.77
4.4.40.0020.0384.71
4.4.30.0070.0204.76
4.4.20.0050.0204.85
4.4.10.0070.0184.85
4.4.00.0020.0324.76
4.3.110.0020.0244.67
4.3.100.0040.0134.67
4.3.90.0050.0204.63
4.3.80.0050.0284.59
4.3.70.0040.0134.63
4.3.60.0010.0164.63
4.3.50.0000.0184.62
4.3.40.0030.0364.54
4.3.30.0010.0203.30
4.3.20.0020.0183.28
4.3.10.0020.0173.23
4.3.00.0170.01341.21

preferences:
38.8 ms | 401 KiB | 5 Q