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.60.0150.00016.38
8.3.50.0130.00523.06
8.3.40.0120.00318.63
8.3.30.0080.00618.93
8.3.20.0060.00320.39
8.3.10.0080.00023.39
8.3.00.0040.00419.38
8.2.180.0090.00616.38
8.2.170.0120.00622.96
8.2.160.0100.00320.52
8.2.150.0070.00024.18
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0040.00421.00
8.2.110.0030.00622.07
8.2.100.0060.00719.31
8.2.90.0030.00619.06
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00817.67
8.2.50.0090.00018.07
8.2.40.0040.00419.95
8.2.30.0060.00318.13
8.2.20.0040.00417.80
8.2.10.0060.00317.98
8.2.00.0040.00417.67
8.1.280.0110.00425.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00723.97
8.1.230.0040.00718.99
8.1.220.0080.00017.77
8.1.210.0040.00418.77
8.1.200.0090.00017.35
8.1.190.0030.00617.23
8.1.180.0070.00319.14
8.1.170.0080.00018.59
8.1.160.0000.00721.93
8.1.150.0000.00718.81
8.1.140.0050.00317.45
8.1.130.0080.00017.83
8.1.120.0030.00417.48
8.1.110.0000.00817.50
8.1.100.0070.00017.35
8.1.90.0030.00317.52
8.1.80.0030.00617.46
8.1.70.0040.00417.46
8.1.60.0030.00617.60
8.1.50.0050.00317.52
8.1.40.0040.00417.50
8.1.30.0000.00817.54
8.1.20.0040.00417.60
8.1.10.0000.00817.60
8.1.00.0070.00017.50
8.0.300.0060.00318.77
8.0.290.0080.00016.63
8.0.280.0030.00318.34
8.0.270.0030.00317.18
8.0.260.0060.00017.31
8.0.250.0050.00316.84
8.0.240.0080.00016.93
8.0.230.0000.00716.81
8.0.220.0070.00016.78
8.0.210.0070.00016.74
8.0.200.0090.00016.96
8.0.190.0060.00316.94
8.0.180.0090.00016.89
8.0.170.0080.00016.82
8.0.160.0000.00716.80
8.0.150.0050.00316.84
8.0.140.0050.00216.75
8.0.130.0060.00013.31
8.0.120.0000.00816.83
8.0.110.0040.00416.75
8.0.100.0070.00016.98
8.0.90.0000.00816.73
8.0.80.0060.01316.91
8.0.70.0040.00416.75
8.0.60.0000.00716.95
8.0.50.0030.00316.77
8.0.30.0110.00817.19
8.0.20.0060.01317.40
8.0.10.0030.00416.97
8.0.00.0110.01116.87
7.4.330.0050.00015.00
7.4.320.0040.00416.49
7.4.300.0060.00016.41
7.4.290.0040.00416.39
7.4.280.0100.00016.49
7.4.270.0060.00016.59
7.4.260.0030.00516.61
7.4.250.0040.00416.51
7.4.240.0020.00516.51
7.4.230.0000.00716.39
7.4.220.0090.00916.61
7.4.210.0070.01116.68
7.4.200.0050.00316.48
7.4.160.0090.00616.39
7.4.150.0070.01717.40
7.4.140.0070.01017.86
7.4.130.0080.01016.46
7.4.120.0110.00616.52
7.4.110.0140.01416.45
7.4.100.0120.00616.62
7.4.90.0110.00716.37
7.4.80.0080.01419.39
7.4.70.0050.01116.64
7.4.60.0030.01316.51
7.4.50.0030.00316.75
7.4.40.0180.00316.41
7.4.30.0090.00916.58
7.4.00.0110.00615.00
7.3.330.0000.00513.16
7.3.320.0040.00413.24
7.3.310.0000.00616.29
7.3.300.0000.00616.30
7.3.290.0090.00616.31
7.3.280.0100.00716.31
7.3.270.0120.00817.40
7.3.260.0160.00716.37
7.3.250.0030.01616.48
7.3.240.0040.01416.20
7.3.230.0090.00616.39
7.3.210.0040.01616.48
7.3.200.0070.01419.39
7.3.190.0030.01316.59
7.3.180.0120.00316.66
7.3.170.0080.00816.72
7.3.160.0070.01116.50
7.3.120.0070.01014.73
7.3.110.0050.01014.58
7.3.100.0040.01414.89
7.3.90.0050.00814.89
7.3.80.0030.01114.89
7.3.70.0050.01014.76
7.3.60.0030.01214.79
7.3.50.0020.00914.70
7.3.40.0020.00914.93
7.3.30.0080.00714.63
7.3.20.0080.00616.57
7.3.10.0070.00816.64
7.3.00.0100.00216.74
7.2.330.0110.00816.75
7.2.320.0160.00316.78
7.2.310.0060.01016.79
7.2.300.0090.00616.70
7.2.290.0090.00916.84
7.2.250.0120.00515.18
7.2.240.0120.00715.22
7.2.230.0070.00915.17
7.2.220.0070.00415.26
7.2.210.0030.01214.93
7.2.200.0080.00815.07
7.2.190.0050.00714.96
7.2.180.0070.00715.02
7.2.170.0070.00614.90
7.2.60.0070.00717.11
7.2.00.0000.01419.29
7.1.330.0070.00715.80
7.1.320.0050.00815.68
7.1.310.0050.01115.88
7.1.300.0070.00415.68
7.1.290.0080.00615.80
7.1.280.0080.00515.87
7.1.270.0050.00615.64
7.1.260.0060.00515.86
7.1.200.0140.00015.80
7.1.100.0060.00618.25
7.1.70.0030.00617.11
7.1.60.0040.01419.40
7.1.50.0070.01717.00
7.1.00.0070.07322.40
7.0.200.0000.00716.81
7.0.140.0070.07022.08
7.0.60.0100.08019.82
7.0.50.0070.08317.89
7.0.40.0030.08720.11
7.0.30.0270.06020.07
7.0.20.0200.04020.19
7.0.10.0100.05320.22
7.0.00.0030.05020.13
5.6.280.0070.07021.15
5.6.210.0100.08320.67
5.6.200.0070.03718.13
5.6.190.0070.07720.41
5.6.180.0300.04720.39
5.6.170.0300.09020.55
5.6.160.0030.04320.44
5.6.150.0170.07318.27
5.6.140.0070.04718.27
5.6.130.0170.05718.18
5.6.120.0030.08721.02
5.6.110.0100.08721.13
5.6.100.0100.08021.04
5.6.90.0070.03721.05
5.6.80.0130.07720.42
5.5.350.0030.07720.48
5.5.340.0070.07317.96
5.5.330.0130.03720.40
5.5.320.0000.04720.41
5.5.310.0170.04020.36
5.5.300.0130.07718.09
5.5.290.0070.08018.05
5.5.280.0070.05320.83
5.5.270.0070.04720.88
5.5.260.0030.09020.77
5.5.250.0000.04320.73
5.5.240.0170.03720.20
5.4.450.0630.05019.31
5.4.440.0270.04319.30
5.4.430.0330.04319.54
5.4.420.0230.04719.54
5.4.410.0230.04019.39
5.4.400.0200.03719.20
5.4.390.0170.04719.00
5.4.380.0200.04718.49
5.4.370.0170.05018.69
5.4.360.0330.03718.78
5.4.350.0130.05718.63
5.4.340.0130.05318.66
5.4.320.0060.03812.53
5.4.310.0070.03712.52
5.4.300.0130.06012.53
5.4.290.0090.03512.52
5.4.280.0040.03712.41
5.4.270.0050.03812.42
5.4.260.0050.03912.42
5.4.250.0070.03712.41
5.4.240.0060.03712.42
5.4.230.0060.03812.41
5.4.220.0070.03412.41
5.4.210.0050.03612.41
5.4.200.0130.04612.41
5.4.190.0070.03712.40
5.4.180.0110.04812.41
5.4.170.0090.04012.41
5.4.160.0040.03912.41
5.4.150.0080.03412.41
5.4.140.0080.03512.10
5.4.130.0060.03712.07
5.4.120.0110.04612.05
5.4.110.0040.04112.04
5.4.100.0060.03612.04
5.4.90.0080.03512.04
5.4.80.0080.04112.04
5.4.70.0050.04012.04
5.4.60.0050.05312.04
5.4.50.0080.04712.03
5.4.40.0040.03712.02
5.4.30.0050.03612.02
5.4.20.0100.03212.01
5.4.10.0070.03512.02
5.4.00.0060.05311.51
5.3.290.0110.04612.80
5.3.280.0100.04812.71
5.3.270.0080.05312.72
5.3.260.0090.05112.72
5.3.250.0050.03912.72
5.3.240.0080.03712.72
5.3.230.0140.03412.71
5.3.220.0090.03412.68
5.3.210.0070.03912.68
5.3.200.0060.03712.68
5.3.190.0060.03812.68
5.3.180.0050.03912.67
5.3.170.0050.03912.67
5.3.160.0030.04512.67
5.3.150.0060.05512.67
5.3.140.0090.05212.66
5.3.130.0100.05412.65
5.3.120.0080.05412.66
5.3.110.0070.05712.66
5.3.100.0110.04912.14
5.3.90.0070.04312.12
5.3.80.0050.04112.11
5.3.70.0080.03412.11
5.3.60.0050.03812.09
5.3.50.0050.03812.04
5.3.40.0050.03812.04
5.3.30.0070.03512.00
5.3.20.0030.03811.77
5.3.10.0080.04811.74
5.3.00.0070.05011.73
5.2.170.0060.0349.23
5.2.160.0040.0309.22
5.2.150.0060.0299.22
5.2.140.0070.0399.22
5.2.130.0060.0289.18
5.2.120.0070.0279.18
5.2.110.0050.0329.19
5.2.100.0020.0319.19
5.2.90.0050.0279.18
5.2.80.0050.0339.18
5.2.70.0080.0449.18
5.2.60.0060.0419.13
5.2.50.0050.0429.10
5.2.40.0070.0379.07
5.2.30.0050.0419.05
5.2.20.0120.0349.04
5.2.10.0080.0348.95
5.2.00.0070.0398.82
5.1.60.0070.0438.09
5.1.50.0040.0368.09
5.1.40.0080.0308.08
5.1.30.0060.0348.43
5.1.20.0050.0328.45
5.1.10.0040.0268.16
5.1.00.0030.0278.17
5.0.50.0030.0226.65
5.0.40.0020.0216.50
5.0.30.0040.0326.32
5.0.20.0060.0256.29
5.0.10.0050.0266.26
5.0.00.0040.0386.25
4.4.90.0030.0214.78
4.4.80.0030.0204.75
4.4.70.0040.0184.76
4.4.60.0030.0194.75
4.4.50.0020.0214.77
4.4.40.0020.0334.71
4.4.30.0060.0194.76
4.4.20.0050.0204.84
4.4.10.0040.0204.85
4.4.00.0060.0284.76
4.3.110.0040.0214.66
4.3.100.0030.0214.66
4.3.90.0030.0204.63
4.3.80.0050.0294.58
4.3.70.0030.0204.63
4.3.60.0030.0204.63
4.3.50.0040.0204.63
4.3.40.0050.0294.54
4.3.30.0040.0203.30
4.3.20.0030.0203.28
4.3.10.0050.0173.24
4.3.00.0030.01315.62

preferences:
45 ms | 401 KiB | 5 Q