3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const ALPHA = 1, BETA = 2, GAMMA = 3; public $a = "apple", $b = "bread", $c = "candy"; function showAll(){ $constants = self::ALPHA . self::BETA . self::GAMMA; $p = " {$this->a} {$this->b} {$this->c}"; return $constants . $p; } } echo (new Test)->showAll(); // 123 apple bread candy

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.01216.63
8.3.50.0080.01022.78
8.3.40.0190.00318.67
8.3.30.0000.01418.95
8.3.20.0040.00420.16
8.3.10.0040.00421.93
8.3.00.0050.00517.25
8.2.180.0080.01518.54
8.2.170.0140.00722.96
8.2.160.0110.00420.43
8.2.150.0100.00724.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0000.00821.00
8.2.110.0060.00321.96
8.2.100.0120.00017.84
8.2.90.0050.00219.22
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0000.00717.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0080.00318.09
8.2.20.0050.00217.71
8.2.10.0040.00418.18
8.2.00.0000.00717.75
8.1.280.0170.00325.92
8.1.270.0040.00423.88
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.84
8.1.230.0070.00419.07
8.1.220.0040.00417.80
8.1.210.0080.00018.77
8.1.200.0000.01117.13
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0040.00418.59
8.1.160.0080.00021.93
8.1.150.0040.00418.68
8.1.140.0040.00417.39
8.1.130.0070.00017.75
8.1.120.0040.00417.25
8.1.110.0050.00317.40
8.1.100.0050.00217.38
8.1.90.0040.00417.45
8.1.80.0060.00317.29
8.1.70.0000.00717.36
8.1.60.0000.00817.63
8.1.50.0040.00417.57
8.1.40.0050.00317.42
8.1.30.0050.00317.71
8.1.20.0050.00317.54
8.1.10.0030.00517.60
8.1.00.0040.00417.52
8.0.300.0000.00718.77
8.0.290.0000.00816.75
8.0.280.0030.00318.38
8.0.270.0040.00417.30
8.0.260.0030.00317.25
8.0.250.0030.00316.86
8.0.240.0040.00417.00
8.0.230.0050.00516.97
8.0.220.0000.00716.88
8.0.210.0030.00316.89
8.0.200.0000.00716.95
8.0.190.0000.00816.81
8.0.180.0050.00316.95
8.0.170.0030.00516.77
8.0.160.0020.00516.92
8.0.150.0070.00016.86
8.0.140.0030.00616.81
8.0.130.0030.00313.28
8.0.120.0000.00816.90
8.0.110.0050.00216.80
8.0.100.0040.00416.96
8.0.90.0000.00716.69
8.0.80.0110.00416.89
8.0.70.0070.00016.95
8.0.60.0040.00416.71
8.0.50.0040.00416.78
8.0.30.0110.00817.09
8.0.20.0110.00817.40
8.0.10.0040.00416.76
8.0.00.0090.00916.98
7.4.330.0030.00315.00
7.4.320.0030.00316.34
7.4.300.0030.00316.41
7.4.290.0030.00316.50
7.4.280.0040.00416.50
7.4.270.0040.00416.66
7.4.260.0030.00316.57
7.4.250.0070.00016.56
7.4.240.0040.00416.52
7.4.230.0030.00316.51
7.4.220.0120.01216.64
7.4.210.0100.00316.58
7.4.200.0030.00316.70
7.4.160.0130.00316.39
7.4.150.0140.00317.40
7.4.140.0100.00717.86
7.4.130.0080.00916.62
7.4.120.0040.01416.67
7.4.110.0060.01016.62
7.4.100.0090.00916.38
7.4.90.0000.02516.64
7.4.80.0100.00719.39
7.4.70.0200.00316.45
7.4.60.0130.00316.66
7.4.50.0050.00016.43
7.4.40.0030.01216.56
7.4.30.0100.01016.37
7.4.10.0070.00815.65
7.4.00.0050.01215.38
7.3.330.0000.00513.18
7.3.320.0000.00513.23
7.3.310.0040.00416.13
7.3.300.0030.00516.09
7.3.290.0060.00916.15
7.3.280.0070.01116.23
7.3.270.0150.00717.40
7.3.260.0090.00916.41
7.3.250.0070.01016.53
7.3.240.0130.00716.41
7.3.230.0060.01016.39
7.3.210.0100.00716.31
7.3.200.0080.01119.39
7.3.190.0060.01316.49
7.3.180.0080.00816.22
7.3.170.0090.00616.29
7.3.160.0060.00916.36
7.3.130.0090.01015.49
7.3.120.0110.00315.57
7.3.110.0050.01215.65
7.3.100.0050.00715.54
7.3.90.0060.00715.50
7.3.80.0120.00115.50
7.3.70.0020.01115.40
7.3.60.0050.00915.59
7.3.50.0040.00815.50
7.3.40.0080.00415.54
7.3.30.0030.01015.38
7.3.20.0020.01117.37
7.3.10.0060.00917.27
7.3.00.0060.00917.04
7.2.330.0090.00916.44
7.2.320.0140.00916.73
7.2.310.0130.00716.73
7.2.300.0040.01816.72
7.2.290.0090.01316.57
7.2.260.0080.01015.56
7.2.250.0070.01115.98
7.2.240.0080.00715.91
7.2.230.0050.01015.69
7.2.220.0070.00715.95
7.2.210.0060.00416.02
7.2.200.0050.00715.91
7.2.190.0020.01415.78
7.2.180.0060.00715.75
7.2.170.0070.00815.84
7.2.160.0070.00515.79
7.2.150.0040.01017.55
7.2.140.0030.01017.59
7.2.130.0080.00717.34
7.2.120.0060.00717.26
7.2.110.0080.00817.36
7.2.100.0050.01117.24
7.2.90.0070.00617.34
7.2.80.0070.00717.33
7.2.70.0070.00717.45
7.2.60.0090.00717.34
7.2.50.0070.00717.48
7.2.40.0070.00717.38
7.2.30.0040.00817.43
7.2.20.0040.00817.42
7.2.10.0040.01017.38
7.2.00.0070.00717.98
7.1.330.0080.00616.50
7.1.320.0060.00616.49
7.1.310.0070.00416.33
7.1.300.0030.01316.52
7.1.290.0040.01116.42
7.1.280.0040.00816.60
7.1.270.0050.00816.54
7.1.260.0070.00816.44
7.1.250.0060.00516.23
7.1.240.0060.00816.08
7.1.230.0050.00816.16
7.1.220.0060.00616.15
7.1.210.0020.00815.92
7.1.200.0090.00316.18
7.1.190.0050.00816.07
7.1.180.0060.00716.14
7.1.170.0080.00716.19
7.1.160.0020.01016.23
7.1.150.0070.00616.12
7.1.140.0030.00816.16
7.1.130.0060.00716.15
7.1.120.0040.00916.16
7.1.110.0090.00616.26
7.1.100.0080.00716.54
7.1.90.0080.00416.11
7.1.80.0030.01016.14
7.1.70.0060.00616.27
7.1.60.0090.00716.92
7.1.50.0050.01016.24
7.1.40.0050.00616.29
7.1.30.0080.00615.88
7.1.20.0070.00716.08
7.1.10.0060.00716.05
7.1.00.0030.02717.64
7.0.330.0050.00715.69
7.0.320.0060.00515.78
7.0.310.0080.00615.79
7.0.300.0060.00715.85
7.0.290.0080.00515.84
7.0.280.0080.00716.05
7.0.270.0040.00915.72
7.0.260.0070.00615.89
7.0.250.0020.01215.84
7.0.240.0080.00415.89
7.0.230.0050.00716.03
7.0.220.0100.00515.94
7.0.210.0080.00515.82
7.0.200.0060.00616.12
7.0.190.0030.01015.77
7.0.180.0050.00715.93
7.0.170.0050.00715.89
7.0.160.0060.00715.82
7.0.150.0050.00916.03
7.0.140.0050.02317.51
7.0.130.0040.00615.93
7.0.120.0060.00815.73
7.0.110.0030.00915.98
7.0.100.0060.00615.98
7.0.90.0030.00915.96
7.0.80.0070.00715.97
7.0.70.0060.00515.79
7.0.60.0070.01916.85
7.0.50.0060.02416.33
7.0.40.0090.02415.50
7.0.30.0090.02215.52
7.0.20.0110.02415.54
7.0.10.0060.01715.56
7.0.00.0040.02515.50
5.6.400.0060.00615.13
5.6.390.0050.01015.12
5.6.380.0070.00514.67
5.6.370.0060.00814.86
5.6.360.0060.00714.82
5.6.350.0050.00614.74
5.6.340.0060.00814.98
5.6.330.0030.00914.71
5.6.320.0050.00914.78
5.6.310.0050.00814.96
5.6.300.0030.01214.72
5.6.290.0040.00914.91
5.6.280.0040.02616.37
5.6.270.0080.00614.79
5.6.260.0060.01014.88
5.6.250.0050.00514.81
5.6.240.0040.00814.78
5.6.230.0100.00414.70
5.6.220.0050.00814.72
5.6.210.0040.02816.16
5.6.200.0040.02315.64
5.6.190.0060.01616.23
5.6.180.0140.01516.30
5.6.170.0090.01616.20
5.6.160.0060.02416.26
5.6.150.0080.02115.60
5.6.140.0040.02715.67
5.6.130.0070.02415.67
5.6.120.0060.02616.25
5.6.110.0050.01616.44
5.6.100.0110.02116.39
5.6.90.0070.01816.38
5.6.80.0020.01616.13
5.6.70.0020.01014.76
5.6.60.0080.00614.73
5.6.50.0020.01014.75
5.6.40.0030.01014.62
5.6.30.0040.01014.77
5.6.20.0050.00814.77
5.6.10.0040.01114.60
5.6.00.0080.00714.67
5.5.380.0080.00413.81
5.5.370.0070.00513.77
5.5.360.0040.00813.57
5.5.350.0110.01415.32
5.5.340.0050.02714.82
5.5.330.0080.02415.46
5.5.320.0090.01515.42
5.5.310.0090.02315.42
5.5.300.0040.01714.68
5.5.290.0050.01614.93
5.5.280.0040.01415.50
5.5.270.0040.02815.60
5.5.260.0060.01515.53
5.5.250.0060.02415.33
5.5.240.0040.02515.28
5.5.230.0050.00613.58
5.5.220.0070.00513.59
5.5.210.0070.00313.62
5.5.200.0020.01113.58
5.5.190.0040.00913.54
5.5.180.0050.00713.59
5.5.170.0060.00713.62
5.5.160.0030.00813.76
5.5.150.0050.00613.63
5.5.140.0040.00713.60
5.5.130.0050.00613.88
5.5.120.0040.00713.70
5.5.110.0060.00513.63
5.5.100.0080.00313.68
5.5.90.0050.00813.83
5.5.80.0040.00713.71
5.5.70.0070.00513.64
5.5.60.0030.00813.63
5.5.50.0040.00813.62
5.5.40.0090.00413.59
5.5.30.0050.00613.82
5.5.20.0060.00413.67
5.5.10.0070.00513.61
5.5.00.0020.00813.68
5.4.450.0240.01514.07
5.4.440.0220.01814.21
5.4.430.0250.01714.19
5.4.420.0220.01614.18
5.4.410.0100.01414.15
5.4.400.0220.01914.00
5.4.390.0220.01914.03
5.4.380.0060.01613.94
5.4.370.0080.01413.86
5.4.360.0050.01514.06
5.4.350.0060.01312.25
5.4.340.0060.01512.29
5.4.330.0040.00712.37
5.4.320.0030.01412.35
5.4.310.0040.01312.35
5.4.300.0050.01212.38
5.4.290.0050.01412.37
5.4.280.0040.01512.31
5.4.270.0040.01212.36
5.4.260.0050.01412.40
5.4.250.0070.01412.37
5.4.240.0060.01312.34
5.4.230.0050.01512.35
5.4.220.0050.01312.38
5.4.210.0030.01412.34
5.4.200.0020.01612.41
5.4.190.0030.01512.44
5.4.180.0040.01312.44
5.4.170.0060.01312.33
5.4.160.0030.01412.31
5.4.150.0050.01312.39
5.4.140.0020.01512.35
5.4.130.0050.01412.38
5.4.120.0030.01412.24
5.4.110.0040.01512.23
5.4.100.0050.01412.31
5.4.90.0030.01312.24
5.4.80.0060.01112.28
5.4.70.0020.01512.23
5.4.60.0060.01312.27
5.4.50.0040.01512.31
5.4.40.0040.01512.29
5.4.30.0040.01212.30
5.4.20.0020.01612.26
5.4.10.0050.01312.31
5.4.00.0050.01312.11
5.3.290.0030.01412.45
5.3.280.0030.01612.43
5.3.270.0060.01212.42
5.3.260.0050.01512.45
5.3.250.0070.01312.46
5.3.240.0040.01612.42
5.3.230.0020.01712.47
5.3.220.0050.01312.39
5.3.210.0050.01612.40
5.3.200.0060.01412.44
5.3.190.0020.01412.41
5.3.180.0050.01312.54
5.3.170.0030.01612.48
5.3.160.0030.01412.47
5.3.150.0050.01312.47
5.3.140.0030.01412.42
5.3.130.0080.01012.45
5.3.120.0040.01412.45
5.3.110.0050.01412.45
5.3.100.0030.01712.29
5.3.90.0020.01412.35
5.3.80.0050.01212.33
5.3.70.0020.01612.29
5.3.60.0040.01212.30
5.3.50.0040.01312.24
5.3.40.0020.01412.27
5.3.30.0020.01512.26
5.3.20.0030.01512.22
5.3.10.0030.01412.15
5.3.00.0040.01312.16
5.2.170.0020.01810.06
5.2.160.0020.01910.06
5.2.150.0060.01410.06
5.2.140.0020.01810.06
5.2.130.0020.01910.04
5.2.120.0050.01910.04
5.2.110.0040.02110.04
5.2.100.0060.01510.04
5.2.90.0040.01610.04
5.2.80.0050.01710.04
5.2.70.0020.02110.04
5.2.60.0030.01710.01
5.2.50.0030.01710.00
5.2.40.0050.0159.99
5.2.30.0040.0159.97
5.2.20.0070.0169.97
5.2.10.0060.0189.92
5.2.00.0020.0199.86
5.1.60.0050.0139.49
5.1.50.0010.0199.49
5.1.40.0050.0169.48
5.1.30.0020.0159.66
5.1.20.0060.0139.67
5.1.10.0030.0169.53
5.1.00.0050.0139.53
5.0.50.0040.0138.77
5.0.40.0030.0158.70
5.0.30.0040.0158.61
5.0.20.0010.0138.59
5.0.10.0020.0128.58
5.0.00.0060.0198.57
4.4.90.0020.0097.84
4.4.80.0010.0107.83
4.4.70.0030.0087.83
4.4.60.0030.0077.83
4.4.50.0040.0077.84
4.4.40.0040.0127.80
4.4.30.0020.0097.83
4.4.20.0030.0107.87
4.4.10.0020.0107.88
4.4.00.0010.0157.83
4.3.110.0020.0097.78
4.3.100.0030.0097.78
4.3.90.0000.0107.77
4.3.80.0020.0157.74
4.3.70.0030.0107.76
4.3.60.0040.0087.76
4.3.50.0020.0147.76
4.3.40.0020.0137.72
4.3.30.0030.0097.10
4.3.20.0030.0087.09
4.3.10.0010.0107.07
4.3.00.0120.0129.01

preferences:
48.53 ms | 401 KiB | 5 Q