3v4l.org

run code in 300+ PHP versions simultaneously
<?php $renderPyramid = function ($height) { $baseWidth = $height * 2 - 1; for ($i = 1; $i <= $height; $i++) { $spaces = str_pad('', $baseWidth - $i, ' '); $dots = str_pad('', $i * 2 - 1, '.'); echo $spaces . $dots . PHP_EOL; } }; $renderPyramid(4);

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.4.20.0200.00017.63
8.4.10.0060.00317.63
8.3.150.0120.00617.18
8.3.140.0080.00016.66
8.3.130.0050.00318.36
8.3.120.0060.00318.83
8.3.110.0000.00916.50
8.3.100.0080.00024.06
8.3.90.0150.00326.77
8.3.80.0060.00318.30
8.3.70.0100.01016.58
8.3.60.0170.00316.63
8.3.50.0070.01022.91
8.3.40.0140.00018.69
8.3.30.0110.00719.14
8.3.20.0030.00520.30
8.3.10.0040.00420.53
8.3.00.0020.00520.80
8.2.270.0100.00717.08
8.2.260.0040.00418.91
8.2.250.0040.00418.32
8.2.240.0060.00318.87
8.2.230.0000.00820.94
8.2.220.0050.00337.54
8.2.210.0040.01126.77
8.2.200.0000.00916.63
8.2.190.0070.00716.60
8.2.180.0150.00018.41
8.2.170.0030.01022.96
8.2.160.0080.00620.36
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00019.36
8.2.110.0040.00420.99
8.2.100.0000.01117.72
8.2.90.0040.00420.42
8.2.80.0000.00820.27
8.2.70.0000.00817.63
8.2.60.0070.00017.63
8.2.50.0040.00418.07
8.2.40.0030.00518.08
8.2.30.0000.00719.34
8.2.20.0040.00417.56
8.2.10.0000.00818.13
8.2.00.0040.00417.80
8.1.310.0060.00316.53
8.1.300.0110.00720.17
8.1.290.0060.00330.84
8.1.280.0180.00325.92
8.1.270.0000.00823.91
8.1.260.0070.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.18
8.1.230.0070.00422.66
8.1.220.0020.00517.79
8.1.210.0000.00918.91
8.1.200.0030.00617.00
8.1.190.0090.00017.22
8.1.180.0090.00318.10
8.1.170.0030.00618.57
8.1.160.0030.00618.87
8.1.150.0040.00418.93
8.1.140.0000.00917.55
8.1.130.0030.00317.73
8.1.120.0070.00017.36
8.1.110.0000.00817.33
8.1.100.0000.00717.50
8.1.90.0030.00417.35
8.1.80.0000.00717.46
8.1.70.0000.00717.38
8.1.60.0060.00317.48
8.1.50.0000.00817.58
8.1.40.0030.01017.40
8.1.30.0030.00517.66
8.1.20.0040.00417.57
8.1.10.0080.00017.43
8.1.00.0040.00417.41
8.0.300.0000.00720.07
8.0.290.0070.00016.58
8.0.280.0040.00418.34
8.0.270.0060.00317.12
8.0.260.0030.00317.29
8.0.250.0060.00016.98
8.0.240.0030.00316.92
8.0.230.0000.00716.98
8.0.220.0050.00216.89
8.0.210.0000.00816.83
8.0.200.0000.00716.93
8.0.190.0050.00316.99
8.0.180.0040.00416.93
8.0.170.0050.00316.86
8.0.160.0070.00016.93
8.0.150.0070.00316.79
8.0.140.0000.00816.72
8.0.130.0030.00313.37
8.0.120.0090.00016.73
8.0.110.0040.00416.81
8.0.100.0030.00316.88
8.0.90.0030.00316.88
8.0.80.0170.00016.78
8.0.70.0040.00416.79
8.0.60.0040.00416.75
8.0.50.0040.00416.89
8.0.30.0130.00716.85
8.0.20.0130.00417.40
8.0.10.0000.00716.78
8.0.00.0050.01216.72
7.4.330.0000.00515.14
7.4.320.0030.00316.44
7.4.300.0030.00316.39
7.4.290.0030.00316.56
7.4.280.0070.00316.58
7.4.270.0040.00416.51
7.4.260.0030.00316.50
7.4.250.0030.00316.56
7.4.240.0020.00516.57
7.4.230.0070.00016.24
7.4.220.0090.00916.69
7.4.210.0090.00616.66
7.4.200.0040.00416.66
7.4.160.0000.01616.57
7.4.150.0130.00317.40
7.4.140.0050.01217.86
7.4.130.0110.00716.53
7.4.120.0090.01016.49
7.4.110.0070.01716.50
7.4.100.0120.00616.43
7.4.90.0130.01016.30
7.4.80.0030.01319.39
7.4.70.0170.00316.62
7.4.60.0080.01516.53
7.4.50.0040.00416.18
7.4.40.0060.01216.32
7.4.30.0090.00616.53
7.4.10.0070.01014.71
7.4.00.0070.01014.99
7.3.330.0000.00613.27
7.3.320.0000.00513.24
7.3.310.0000.00716.34
7.3.300.0030.00316.16
7.3.290.0060.00916.31
7.3.280.0070.01116.30
7.3.270.0100.00917.40
7.3.260.0130.00616.59
7.3.250.0070.01016.52
7.3.240.0140.00316.63
7.3.230.0120.00616.39
7.3.210.0000.01716.52
7.3.200.0060.01619.39
7.3.190.0090.00816.37
7.3.180.0080.00816.67
7.3.170.0040.01616.35
7.3.160.0090.01216.45
7.3.130.0100.01014.44
7.3.120.0110.00314.67
7.3.110.0020.01414.88
7.3.100.0020.01314.78
7.3.90.0070.00614.85
7.3.80.0060.00714.95
7.3.70.0090.00314.91
7.3.60.0030.01214.81
7.3.50.0090.00414.75
7.3.40.0040.00914.69
7.3.30.0020.01314.83
7.3.20.0070.00716.58
7.3.10.0060.00716.60
7.3.00.0050.00416.80
7.2.330.0140.00416.76
7.2.320.0030.01716.67
7.2.310.0040.01416.57
7.2.300.0070.01016.63
7.2.290.0190.00416.60
7.2.260.0090.00315.22
7.2.250.0070.01114.91
7.2.240.0060.00815.09
7.2.230.0120.00415.16
7.2.220.0070.00615.13
7.2.210.0070.00615.11
7.2.200.0050.00714.90
7.2.190.0040.01015.01
7.2.180.0020.00815.05
7.2.170.0080.00515.02
7.2.160.0060.00414.98
7.2.150.0070.00717.10
7.2.140.0050.00816.75
7.2.130.0030.01216.78
7.2.120.0050.00816.96
7.2.110.0070.00916.79
7.2.100.0040.01016.87
7.2.90.0070.00816.99
7.2.80.0040.01216.88
7.2.70.0070.00716.83
7.2.60.0010.01116.98
7.2.50.0060.00716.83
7.2.40.0030.00816.97
7.2.30.0070.00916.95
7.2.20.0030.01016.94
7.2.10.0050.00916.84
7.2.00.0080.00717.76
7.1.330.0080.00615.95
7.1.320.0090.00715.87
7.1.310.0060.00515.78
7.1.300.0050.01115.86
7.1.290.0020.01115.73
7.1.280.0000.01415.81
7.1.270.0110.00415.87
7.1.260.0060.00815.79
7.1.250.0070.00615.64
7.1.240.0030.01015.53
7.1.230.0000.00715.77
7.1.220.0050.00615.53
7.1.210.0060.00315.46
7.1.200.0050.00715.71
7.1.190.0030.00515.79
7.1.180.0050.00815.84
7.1.170.0000.00815.71
7.1.160.0040.01115.95
7.1.150.0030.01015.79
7.1.140.0060.00615.51
7.1.130.0000.00915.82
7.1.120.0070.00715.90
7.1.110.0000.01015.93
7.1.100.0080.00617.21
7.1.90.0030.00815.89
7.1.80.0000.01315.65
7.1.70.0000.00816.47
7.1.60.0050.01417.59
7.1.50.0070.00916.28
7.1.40.0060.00315.93
7.1.30.0030.00715.77
7.1.20.0000.01515.68
7.1.10.0000.01015.45
7.1.00.0030.05519.13
7.0.330.0040.00815.48
7.0.320.0000.01115.14
7.0.310.0040.00715.57
7.0.300.0000.00815.19
7.0.290.0000.00915.49
7.0.280.0000.01415.30
7.0.270.0070.00715.47
7.0.260.0030.00615.19
7.0.250.0030.01015.50
7.0.240.0110.00415.21
7.0.230.0050.00615.39
7.0.220.0000.01215.44
7.0.210.0030.00915.59
7.0.200.0050.00516.16
7.0.190.0000.01315.29
7.0.180.0050.00515.55
7.0.170.0040.00415.63
7.0.160.0040.01015.44
7.0.150.0000.00815.47
7.0.140.0040.02318.75
7.0.130.0030.01315.61
7.0.120.0070.00315.54
7.0.110.0030.01015.59
7.0.100.0030.01015.25
7.0.90.0040.00915.63
7.0.80.0070.00715.59
7.0.70.0040.01115.28
7.0.60.0080.04418.66
7.0.50.0050.04316.67
7.0.40.0070.05016.85
7.0.30.0170.03816.81
7.0.20.0180.02016.81
7.0.10.0110.02516.74
7.0.00.0070.02216.82
5.6.400.0000.01314.42
5.6.390.0060.00814.23
5.6.380.0000.01314.36
5.6.370.0040.01114.41
5.6.360.0060.00914.49
5.6.350.0060.00614.56
5.6.340.0070.00713.86
5.6.330.0060.00614.54
5.6.320.0090.00614.27
5.6.310.0000.01314.40
5.6.300.0040.00414.32
5.6.290.0030.01414.43
5.6.280.0070.03717.58
5.6.270.0040.01214.51
5.6.260.0070.00714.63
5.6.250.0100.00314.02
5.6.240.0070.00814.63
5.6.230.0110.00014.23
5.6.220.0000.01314.16
5.6.210.0020.03217.57
5.6.200.0050.03816.36
5.6.190.0100.02417.41
5.6.180.0030.04817.55
5.6.170.0150.02017.43
5.6.160.0030.02717.39
5.6.150.0050.03516.38
5.6.140.0080.03816.30
5.6.130.0050.03816.24
5.6.120.0030.02317.70
5.6.110.0070.04517.77
5.6.100.0080.04217.79
5.6.90.0020.02817.64
5.6.80.0000.02917.31
5.6.70.0030.01414.24
5.6.60.0070.00314.10
5.6.50.0060.00914.28
5.6.40.0000.01414.45
5.6.30.0030.01314.48
5.6.20.0100.00714.29
5.6.10.0000.01414.52
5.6.00.0090.00614.25
5.5.380.0030.01014.08
5.5.370.0040.00814.52
5.5.360.0060.00614.27
5.5.350.0130.04317.32
5.5.340.0080.03516.27
5.5.330.0100.04117.37
5.5.320.0170.03717.41
5.5.310.0240.03517.22
5.5.300.0060.02216.25
5.5.290.0050.04416.12
5.5.280.0030.03917.77
5.5.270.0050.04817.37
5.5.260.0070.02217.66
5.5.250.0000.04917.36
5.5.240.0100.04317.17
5.5.230.0090.00314.29
5.5.220.0090.00314.42
5.5.210.0070.00714.25
5.5.200.0030.00614.09
5.5.190.0100.00614.43
5.5.180.0080.00414.19
5.5.170.0060.00614.12
5.5.160.0000.01314.31
5.5.150.0030.00613.96
5.5.140.0030.00614.19
5.5.130.0030.00614.16
5.5.120.0000.01114.12
5.5.110.0030.01014.13
5.5.100.0000.00914.23
5.5.90.0000.01313.82
5.5.80.0070.00714.09
5.5.70.0040.00714.13
5.5.60.0060.00613.97
5.5.50.0000.01314.36
5.5.40.0070.00714.14
5.5.30.0100.00014.28
5.5.20.0120.00014.07
5.5.10.0070.00714.39
5.5.00.0000.01114.34
5.4.450.0150.02724.57
5.4.440.0130.02324.58
5.4.430.0180.02124.48
5.4.420.0190.02524.60
5.4.410.0120.02624.58
5.4.400.0160.02224.59
5.4.390.0330.02224.55
5.4.380.0220.02224.58
5.4.370.0310.02324.48
5.4.360.0130.02624.43
5.4.350.0120.02112.46
5.4.340.0100.02212.55
5.4.330.0070.00711.13
5.4.320.0140.01812.64
5.4.310.0080.02512.81
5.4.300.0100.02212.54
5.4.290.0110.02312.65
5.4.280.0130.02312.46
5.4.270.0120.02312.89
5.4.260.0080.02212.55
5.4.250.0120.02812.75
5.4.240.0120.02412.57
5.4.230.0100.02212.56
5.4.220.0100.02212.72
5.4.210.0050.02612.61
5.4.200.0120.02512.74
5.4.190.0080.02412.81
5.4.180.0070.02412.59
5.4.170.0080.02512.62
5.4.160.0070.03212.57
5.4.150.0070.02812.37
5.4.140.0070.02512.34
5.4.130.0100.02612.50
5.4.120.0080.02312.40
5.4.110.0030.02512.43
5.4.100.0070.02412.40
5.4.90.0090.02212.35
5.4.80.0130.02312.36
5.4.70.0150.01512.48
5.4.60.0130.02212.40
5.4.50.0100.02112.33
5.4.40.0070.02012.46
5.4.30.0030.02512.43
5.4.20.0070.02512.39
5.4.10.0080.02712.55
5.4.00.0120.02212.08
5.3.290.0130.05014.71
5.3.280.0230.04314.73
5.3.270.0270.04014.52
5.3.260.0400.05314.60
5.3.250.0270.04314.57
5.3.240.0100.05014.77
5.3.230.0200.05014.62
5.3.220.0200.04714.58
5.3.210.0200.04314.48
5.3.200.0030.05714.63
5.3.190.0170.04314.75
5.3.180.0170.04314.61
5.3.170.0230.03714.63
5.3.160.0170.04014.55
5.3.150.0170.03714.74
5.3.140.0170.04014.55
5.3.130.0200.04014.50
5.3.120.0200.05314.54
5.3.110.0270.03714.52
5.3.100.0170.04014.18
5.3.90.0270.04013.99
5.3.80.0100.04714.01
5.3.70.0200.03714.05
5.3.60.0170.04314.07
5.3.50.0130.04314.09
5.3.40.0200.03714.05
5.3.30.0030.04713.88
5.3.20.0270.03313.84
5.3.10.0130.03713.81
5.3.00.0270.03313.78
5.2.170.0200.03011.14
5.2.160.0130.03311.23
5.2.150.0130.03011.03
5.2.140.0130.03710.99
5.2.130.0130.03011.07
5.2.120.0170.02711.02
5.2.110.0170.02311.07
5.2.100.0100.03311.08
5.2.90.0100.03311.10
5.2.80.0070.03711.17
5.2.70.0170.02711.00
5.2.60.0300.04310.95
5.2.50.0230.04010.93
5.2.40.0100.03311.08
5.2.30.0100.04010.93
5.2.20.0130.04010.91
5.2.10.0130.03310.98
5.2.00.0230.02310.70
5.1.60.0070.0309.95
5.1.50.0170.02310.03
5.1.40.0130.0279.99
5.1.30.0130.02710.44
5.1.20.0130.02710.37
5.1.10.0100.03710.07
5.1.00.0200.02010.05
5.0.50.0030.0308.61
5.0.40.0070.0238.36
5.0.30.0200.0408.19
5.0.20.0170.0178.31
5.0.10.0070.0238.13
5.0.00.0130.0338.07
4.4.90.0030.0175.79
4.4.80.0070.0175.82
4.4.70.0130.0105.83
4.4.60.0030.0205.83
4.4.50.0030.0205.84
4.4.40.0030.0305.81
4.4.30.0100.0205.93
4.4.20.0070.0205.90
4.4.10.0130.0175.86
4.4.00.0100.0235.79
4.3.110.0030.0205.80
4.3.100.0070.0205.73
4.3.90.0030.0205.73
4.3.80.0100.0275.78
4.3.70.0100.0135.72
4.3.60.0030.0175.75
4.3.50.0130.0105.74
4.3.40.0070.0305.67
4.3.30.0030.0234.50
4.3.20.0130.0074.50
4.3.10.0030.0204.54
4.3.00.0030.02037.83

preferences:
16.43 ms | 403 KiB | 5 Q