3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Dog { private $_name; protected $_color; public function __construct($name, $color) { $this->_name = $name; $this->_color = $color; } public function greet($greeting) { return function() use ($greeting) { echo "$greeting, I am a {$this->_color} dog named {$this->_name}."; }; } } $dog = new Dog("Rover","red"); $dog->greet("Hello");

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.70.0140.00716.63
8.3.60.0120.00318.43
8.3.50.0120.00622.90
8.3.40.0080.00818.71
8.3.30.0030.01218.97
8.3.20.0040.00420.16
8.3.10.0000.00723.48
8.3.00.0000.00819.38
8.2.180.0070.01416.50
8.2.170.0070.01122.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.95
8.2.110.0040.00422.30
8.2.100.0090.00319.34
8.2.90.0030.00619.18
8.2.80.0000.00917.97
8.2.70.0060.00317.49
8.2.60.0000.00717.93
8.2.50.0040.00418.07
8.2.40.0080.00019.95
8.2.30.0000.00718.07
8.2.20.0040.00417.57
8.2.10.0060.00318.13
8.2.00.0040.00417.56
8.1.280.0070.00725.92
8.1.270.0030.00523.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00023.82
8.1.230.0070.00319.23
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0030.00517.35
8.1.180.0000.00819.01
8.1.170.0080.00018.63
8.1.160.0040.00421.89
8.1.150.0040.00418.82
8.1.140.0000.00717.45
8.1.130.0030.00317.88
8.1.120.0050.00317.37
8.1.110.0040.00417.49
8.1.100.0070.00017.46
8.1.90.0040.00417.48
8.1.80.0000.00717.48
8.1.70.0070.00017.42
8.1.60.0000.00817.48
8.1.50.0000.00817.55
8.1.40.0040.00417.41
8.1.30.0040.00417.66
8.1.20.0040.00417.68
8.1.10.0000.00717.42
8.1.00.0040.00417.49
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0040.00418.26
8.0.270.0000.00717.15
8.0.260.0000.00617.24
8.0.250.0040.00416.76
8.0.240.0000.00916.78
8.0.230.0030.00316.84
8.0.220.0030.00316.71
8.0.210.0040.00416.84
8.0.200.0030.00617.01
8.0.190.0040.00416.92
8.0.180.0110.00016.93
8.0.170.0000.00816.93
8.0.160.0070.00016.93
8.0.150.0040.00416.70
8.0.140.0000.00716.74
8.0.130.0060.00013.36
8.0.120.0030.00516.69
8.0.110.0040.00416.75
8.0.100.0000.00916.89
8.0.90.0000.00716.80
8.0.80.0110.01116.82
8.0.70.0030.00516.79
8.0.60.0040.00416.75
8.0.50.0040.00416.75
8.0.30.0090.01117.19
8.0.20.0130.00817.40
8.0.10.0030.00316.96
8.0.00.0070.01116.90
7.4.330.0050.00015.05
7.4.320.0000.00616.51
7.4.300.0000.00616.40
7.4.290.0040.00416.59
7.4.280.0050.00616.63
7.4.270.0030.00516.62
7.4.260.0070.00016.58
7.4.250.0070.00016.47
7.4.240.0020.00516.49
7.4.230.0000.00716.58
7.4.220.0110.01616.66
7.4.210.0040.01116.50
7.4.200.0050.00316.62
7.4.160.0100.01016.37
7.4.150.0090.00917.40
7.4.140.0080.00817.86
7.4.130.0130.00516.46
7.4.120.0110.00616.39
7.4.110.0120.00716.51
7.4.100.0000.01816.30
7.4.90.0090.00916.43
7.4.80.0100.01019.39
7.4.70.0070.01016.46
7.4.60.0090.01116.44
7.4.50.0000.00816.27
7.4.40.0100.01016.44
7.4.30.0130.00316.44
7.4.00.0030.01015.14
7.3.330.0030.00313.16
7.3.320.0040.00413.14
7.3.310.0070.00016.29
7.3.300.0000.00816.27
7.3.290.0100.00316.26
7.3.280.0080.01116.31
7.3.270.0090.00917.40
7.3.260.0040.01416.37
7.3.250.0110.00816.40
7.3.240.0130.01016.52
7.3.230.0060.01116.51
7.3.210.0120.00616.23
7.3.200.0100.01316.42
7.3.190.0070.01016.35
7.3.180.0090.00916.34
7.3.170.0040.01116.28
7.3.160.0040.01816.36
7.2.330.0170.00316.68
7.2.320.0100.00716.56
7.2.310.0100.00916.59
7.2.300.0150.00616.57
7.2.290.0090.00916.68
7.2.60.0100.00316.73
7.2.00.0060.00919.33
7.1.200.0000.00915.70
7.1.100.0030.01018.20
7.1.70.0000.00817.16
7.1.60.0070.01819.40
7.1.50.0100.01417.08
7.1.00.0070.07322.35
7.0.200.0020.00516.75
7.0.140.0130.06322.12
7.0.60.0130.08019.93
7.0.50.0100.07717.86
7.0.40.0070.04020.03
7.0.30.0270.08320.07
7.0.20.0170.05720.30
7.0.10.0100.04020.16
7.0.00.0070.05020.21
5.6.280.0000.07721.08
5.6.210.0030.05020.52
5.6.200.0030.09018.16
5.6.190.0130.06020.67
5.6.180.0270.03320.61
5.6.170.0370.07020.62
5.6.160.0030.04320.50
5.6.150.0100.07718.18
5.6.140.0030.08718.18
5.6.130.0130.08018.18
5.6.120.0070.08021.00
5.6.110.0070.08321.11
5.6.100.0100.07320.99
5.6.90.0030.04721.11
5.6.80.0100.08020.40
5.5.350.0070.07720.41
5.5.340.0030.03717.98
5.5.330.0030.05320.28
5.5.320.0030.05720.36
5.5.310.0430.06020.30
5.5.300.0100.04317.98
5.5.290.0100.08018.07
5.5.280.0100.04020.89
5.5.270.0070.07720.69
5.5.260.0100.05320.88
5.5.250.0000.09020.72
5.5.240.3900.03720.37
5.4.450.3400.03319.55
5.4.440.3270.04019.64
5.4.430.3670.04019.41
5.4.420.3600.04319.41
5.4.410.3330.05019.19
5.4.400.3400.03719.16
5.4.390.3570.04019.22
5.4.380.3300.03719.07
5.4.370.3100.03318.86
5.4.360.3400.04019.16
5.4.350.3370.03319.25
5.4.340.3700.04019.23
5.4.320.3300.04319.26
5.4.310.3300.03318.87
5.4.300.3530.04019.19
5.4.290.3270.03719.06
5.4.280.3330.04319.25
5.4.270.3500.03719.24
5.4.260.3330.03719.13
5.4.250.3300.03718.88
5.4.240.3900.03318.94
5.4.230.3800.04018.85
5.4.220.3770.04019.21
5.4.210.3470.04319.19
5.4.200.3500.03719.08
5.4.190.3230.03718.86
5.4.180.3730.03319.18
5.4.170.3570.03318.84
5.4.160.3570.03719.09
5.4.150.4330.03319.20
5.4.140.3430.03316.37
5.4.130.3330.03316.36
5.4.120.3500.03316.33
5.4.110.3370.04016.60
5.4.100.3730.03716.61
5.4.90.4600.03016.61
5.4.80.3030.03316.23
5.4.70.3870.04316.41
5.4.60.3870.03316.54
5.4.50.0100.06716.34
5.4.40.2200.03016.42
5.4.30.3470.02716.43
5.4.20.3730.03716.34
5.4.10.3630.03716.50
5.4.00.3670.04015.80
5.3.290.3300.04014.59
5.3.280.3870.04714.53
5.3.270.3530.04314.52
5.3.260.4430.03714.59
5.3.250.3970.03314.59
5.3.240.3330.04014.61
5.3.230.3600.03014.70
5.3.220.3530.04014.50
5.3.210.3370.03714.55
5.3.200.4230.04014.70
5.3.190.3970.03314.63
5.3.180.3530.03714.51
5.3.170.3570.03314.48
5.3.160.3670.03014.66
5.3.150.0000.06714.55
5.3.140.0070.07314.55
5.3.130.3830.03014.54
5.3.120.3730.03714.57
5.3.110.3370.04014.49
5.3.100.3400.02713.96
5.3.90.3730.03714.03
5.3.80.3500.03714.25
5.3.70.3570.03314.03
5.3.60.3130.03013.99
5.3.50.3500.03314.01
5.3.40.3530.03313.86
5.3.30.3700.03713.85
5.3.20.3600.03713.63
5.3.10.0000.05013.75
5.3.00.0100.07013.72
5.2.170.3600.02711.31
5.2.160.2830.03011.06
5.2.150.3070.02711.31
5.2.140.3230.03011.26
5.2.130.2670.02711.12
5.2.120.0330.04711.11
5.2.110.0030.03311.19
5.2.100.3430.02711.20
5.2.90.3130.03011.19
5.2.80.3130.03311.26
5.2.70.3200.03711.00
5.2.60.3170.03011.07
5.2.50.2900.02311.18
5.2.40.2630.02711.00
5.2.30.2930.03711.13
5.2.20.2470.02710.89
5.2.10.3200.03310.95
5.2.00.3070.03310.70
5.1.60.3000.02310.22
5.1.50.2630.02310.08
5.1.40.2800.02310.12
5.1.30.2730.03310.31
5.1.20.2470.02710.27
5.1.10.2430.02010.31
5.1.00.2130.0239.97
5.0.50.1330.0208.53
5.0.40.1700.0208.41
5.0.30.1400.0278.41
5.0.20.1300.0238.41
5.0.10.1330.0208.41
5.0.00.1670.0308.41
4.4.90.0870.0308.41
4.4.80.1430.0108.41
4.4.70.1230.0178.41
4.4.60.1530.0108.41
4.4.50.1470.0138.41
4.4.40.1500.0238.41
4.4.30.1330.0178.41
4.4.20.1400.0208.41
4.4.10.1400.0138.41
4.4.00.1630.0278.41
4.3.110.1630.0208.41
4.3.100.1330.0178.41
4.3.90.1500.0108.41
4.3.80.1370.0208.41
4.3.70.1300.0178.41
4.3.60.1630.0138.41
4.3.50.1370.0138.41
4.3.40.1300.0278.41
4.3.30.0800.0138.41
4.3.20.0900.0238.41
4.3.10.0800.0138.41
4.3.00.0770.0138.41

preferences:
43.65 ms | 401 KiB | 5 Q