3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { private $number; function __construct($int) { $this->number = $int; } } $i = 100; $test = array(); $string = ""; while ($i >1) { $string .= $i; $i-1; $test[] = new test(); } echo count($test); echo "<br><br>".$string;

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.00816.75
8.3.50.0120.00721.28
8.3.40.0070.00718.77
8.3.30.0040.01118.67
8.3.20.0070.00020.34
8.3.10.0090.00921.71
8.3.00.0080.00019.69
8.2.180.0090.00618.68
8.2.170.0110.00422.96
8.2.160.0000.01420.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00417.50
8.2.110.0100.00021.10
8.2.100.0090.00317.91
8.2.90.0050.00317.85
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0030.00521.13
8.2.30.0040.00419.75
8.2.20.0000.00817.86
8.2.10.0050.00318.05
8.2.00.0070.00017.98
8.1.280.0140.00025.92
8.1.270.0020.00520.43
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0090.00022.66
8.1.230.0040.00720.91
8.1.220.0030.00617.74
8.1.210.0090.00018.84
8.1.200.0030.00717.38
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00918.56
8.1.160.0000.00921.88
8.1.150.0000.00818.82
8.1.140.0000.00917.36
8.1.130.0020.00517.76
8.1.120.0040.00417.44
8.1.110.0060.00317.41
8.1.100.0030.00517.41
8.1.90.0070.00317.44
8.1.80.0000.00717.40
8.1.70.0030.00317.29
8.1.60.0050.00317.64
8.1.50.0060.00317.52
8.1.40.0040.00417.48
8.1.30.0030.00517.59
8.1.20.0000.00717.62
8.1.10.0040.00417.49
8.1.00.0050.00317.39
8.0.300.0070.00019.92
8.0.290.0070.00016.60
8.0.280.0070.00018.43
8.0.270.0030.00317.12
8.0.260.0000.00617.11
8.0.250.0040.00416.94
8.0.240.0000.01017.02
8.0.230.0000.00716.90
8.0.220.0000.00716.79
8.0.210.0060.00316.94
8.0.200.0070.00016.95
8.0.190.0000.00817.02
8.0.180.0000.00716.95
8.0.170.0040.00416.82
8.0.160.0040.00416.88
8.0.150.0040.00416.93
8.0.140.0040.00316.86
8.0.130.0050.00013.37
8.0.120.0040.00416.78
8.0.110.0050.00216.93
8.0.100.0040.00416.86
8.0.90.0000.00716.75
8.0.80.0100.00616.86
8.0.70.0040.00416.82
8.0.60.0000.00716.75
8.0.50.0070.00016.79
8.0.30.0080.01016.83
8.0.20.0150.01117.40
8.0.10.0070.00017.00
8.0.00.0090.01016.71
7.4.330.0030.00315.08
7.4.320.0070.00016.46
7.4.300.0060.00016.48
7.4.290.0000.00816.49
7.4.280.0030.00716.40
7.4.270.0070.00016.50
7.4.260.0000.00816.61
7.4.250.0040.00416.43
7.4.240.0020.00516.52
7.4.230.0080.00016.54
7.4.220.0110.00716.55
7.4.210.0100.00316.67
7.4.200.0000.00716.61
7.4.160.0050.01216.40
7.4.150.0150.01117.40
7.4.140.0100.01017.86
7.4.130.0080.01316.48
7.4.120.0090.00816.50
7.4.110.0000.02116.39
7.4.100.0140.00916.80
7.4.90.0090.00916.53
7.4.80.0110.00719.39
7.4.70.0110.00516.15
7.4.60.0030.02016.50
7.4.50.0000.00816.64
7.4.40.0080.00816.46
7.4.30.0110.01416.53
7.3.330.0000.00713.29
7.3.320.0050.00013.46
7.3.310.0000.00716.42
7.3.300.0000.00716.32
7.3.290.0100.00916.39
7.3.280.0070.01116.42
7.3.270.0070.01017.40
7.3.260.0060.01116.68
7.3.250.0090.01316.39
7.3.240.0160.00416.63
7.3.230.0100.00716.48
7.3.210.0110.00716.68
7.3.200.0120.01216.51
7.3.190.0090.00916.48
7.3.180.0060.01316.42
7.3.170.0150.00716.30
7.3.160.0120.00616.31
7.2.330.0100.01316.33
7.2.320.0070.01316.71
7.2.310.0120.00416.54
7.2.300.0080.00816.59
7.2.290.0080.00816.75
7.2.110.0150.00416.40
7.2.100.0080.01116.35
7.2.90.0090.01216.44
7.2.80.0070.01116.25
7.2.70.0130.00816.75
7.2.60.0080.01016.57
7.2.50.0110.00416.52
7.2.40.0070.01016.57
7.2.30.0190.01016.94
7.2.20.0210.00916.78
7.2.10.0220.00717.00
7.2.00.0000.01418.07
7.1.230.0190.00015.57
7.1.220.0110.00815.52
7.1.210.0120.00415.42
7.1.200.0050.01215.61
7.1.190.0100.01015.62
7.1.180.0070.01015.45
7.1.170.0090.00915.39
7.1.160.0080.01215.40
7.1.150.0080.01215.51
7.1.140.0200.00715.70
7.1.130.0170.01015.74
7.1.120.0160.00615.69
7.1.110.0200.00715.78
7.1.100.0130.00516.81
7.1.90.0230.00415.82
7.1.80.0150.01115.82
7.1.70.0060.01016.36
7.1.60.0110.01317.91
7.1.50.0170.01725.38
7.1.40.0060.01315.84
7.1.30.0200.01215.78
7.1.20.0200.01115.87
7.1.10.0140.00615.62
7.1.00.0040.04218.97
7.0.310.0150.00515.38
7.0.300.0070.01015.07
7.0.290.0130.00815.16
7.0.280.0140.01115.42
7.0.270.0090.01315.23
7.0.260.0180.00915.38
7.0.250.0060.01315.13
7.0.240.0150.01015.42
7.0.230.0170.00415.58
7.0.220.0200.00815.18
7.0.210.0090.01815.56
7.0.200.0150.00516.16
7.0.190.0110.01115.44
7.0.180.0160.00815.42
7.0.170.0140.01115.54
7.0.160.0100.01015.39
7.0.150.0030.02315.07
7.0.140.0110.00415.09
7.0.130.0040.01115.29
7.0.120.0130.00315.33
7.0.110.0090.00315.09
7.0.100.0090.00915.37
7.0.90.0060.00615.46
7.0.80.0060.00615.45
7.0.70.0150.00015.43
7.0.60.0030.04217.80
7.0.50.0030.03116.71
7.0.40.0090.04416.55
7.0.30.0170.02116.83
7.0.20.0120.02716.68
7.0.10.0070.04416.68
7.0.00.0070.04516.66
5.6.380.0080.01314.37
5.6.370.0210.00414.56
5.6.360.0060.01014.44
5.6.350.0110.00814.57
5.6.340.0230.00614.64
5.6.330.0260.00014.52
5.6.320.0190.00714.82
5.6.310.0210.00314.58
5.6.300.0200.00714.77
5.6.290.0070.01014.51
5.6.280.0030.03618.03
5.6.270.0090.00614.59
5.6.260.0030.01314.43
5.6.250.0120.00014.55
5.6.240.0070.01114.65
5.6.230.0070.01014.65
5.6.220.0000.01414.63
5.6.210.0070.04817.76
5.6.200.0070.02216.46
5.6.190.0080.04717.56
5.6.180.2100.02517.49
5.6.170.0130.03317.56
5.6.160.0110.03517.44
5.6.150.0030.02716.40
5.6.140.0100.04016.34
5.6.130.0030.04116.33
5.6.120.0100.03917.85
5.6.110.0050.04717.93
5.6.100.0130.04017.89
5.6.90.0070.04217.78
5.6.80.0070.03617.58
5.6.70.1500.01517.42
5.6.60.0070.00714.66
5.6.50.0040.01414.58
5.6.40.0000.01014.57
5.6.30.0060.00914.32
5.6.20.0070.00714.38
5.6.10.0070.00714.39
5.6.00.0070.00714.38
5.5.380.0080.00811.57
5.5.370.0060.00611.32
5.5.360.0050.00711.22
5.5.350.0030.02116.05
5.5.340.0070.03514.59
5.5.330.0070.02415.92
5.5.320.0180.02515.75
5.5.310.0100.02415.79
5.5.300.0010.02614.81
5.5.290.0020.03114.65
5.5.280.0030.03316.31
5.5.270.0120.02516.18
5.5.260.0100.04316.12
5.5.250.0110.04016.18
5.5.240.0200.03815.81
5.5.230.0080.00411.23
5.5.220.0070.00711.22
5.5.210.0030.01211.41
5.5.200.0060.00611.35
5.5.190.0080.00411.25
5.5.180.0030.00911.30
5.5.170.0040.01114.14
5.5.160.0030.01311.05
5.5.150.0030.01011.27
5.5.140.0040.00911.42
5.5.130.0060.00611.33
5.5.120.0040.00411.46
5.5.110.0060.00611.45
5.5.100.0090.00611.21
5.5.90.0000.00811.15
5.5.80.0030.00311.38
5.5.70.0100.00611.26
5.5.60.0040.00811.57
5.5.50.0090.00311.30
5.5.40.0000.01411.29
5.5.30.0110.00011.31
5.5.20.0030.00911.05
5.5.10.0120.00311.32
5.5.00.0060.00911.22
5.4.450.0310.03315.33
5.4.440.0370.02715.54
5.4.430.0300.03015.37
5.4.420.0290.02915.46
5.4.410.0310.03515.35
5.4.400.0250.03215.08
5.4.390.0400.03315.27
5.4.380.0300.03015.22
5.4.370.0380.02815.21
5.4.360.0270.03715.25
5.4.350.0360.02615.09
5.4.340.0340.02715.02
5.4.330.0070.00711.05
5.4.320.0330.02915.15
5.4.310.0380.03715.17
5.4.300.0350.03214.96
5.4.290.0430.03915.11
5.4.280.0280.03315.19
5.4.270.0340.02515.28
5.4.260.0290.03415.29
5.4.250.0050.03315.15
5.4.240.0070.03015.00
5.4.230.0240.02315.00
5.4.220.0400.02915.10
5.4.210.0450.03315.16
5.4.200.0340.02514.00
5.4.190.0400.02015.05
5.4.180.0250.03315.17
5.4.170.0280.03015.18
5.4.160.0350.03315.15
5.4.150.0400.03015.22
5.4.140.0390.02813.97
5.4.130.0320.03113.71
5.4.120.0430.03313.98
5.4.110.0360.03413.92
5.4.100.0280.04513.92
5.4.90.0400.03713.90
5.4.80.0300.03813.86
5.4.70.0340.03113.62
5.4.60.0370.03013.71
5.4.50.0380.03714.03
5.4.40.0390.03713.84
5.4.30.0110.03113.72
5.4.20.0060.03014.00
5.4.10.0250.03013.81
5.4.00.0310.03313.44

preferences:
54.94 ms | 401 KiB | 5 Q