3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_files($path){ $folder = opendir($path); while ($dat = readdir($folder)){ if ($dat != "." && $dat != ".." && (is_dir($path."/".$dat) || substr($dat,-3) == "jpg" || substr($dat,-3) == "gif" || substr($dat,-3) == "bmp" || substr($dat,-3) == "png")){ if (is_dir($path."/".$dat)){ $dirs[] = get_files($path."/".$dat); } else{ $files[] = $path."/".$dat; } } } for ($i=0; $i<sizeof($dirs); $i++){ $files2 = array_merge($files2,$dirs[$i]); } $array = array_merge($files,$files2); return $array; } $path = "../test"; // Pfad zum Startverzeichnis $amount = sizeof(get_files($path)); for ($i=0; $i < $amount; $i++){ $files = get_files($path); $size += filesize($files[$i]); }

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.0110.00718.30
8.3.50.0090.01121.09
8.3.40.0140.00018.83
8.3.30.0070.01118.84
8.3.20.0030.00518.76
8.3.10.0080.00021.05
8.3.00.0080.00023.70
8.2.180.0140.00417.00
8.2.170.0070.01422.96
8.2.160.0150.00020.47
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00721.07
8.2.110.0080.00020.70
8.2.100.0040.00817.78
8.2.90.0000.00918.98
8.2.80.0040.00419.21
8.2.70.0120.00216.98
8.2.60.0040.00417.86
8.2.50.0050.00518.07
8.2.40.0030.00618.22
8.2.30.0070.00021.22
8.2.20.0000.00817.60
8.2.10.0050.00317.84
8.2.00.0000.00717.70
8.1.280.0090.00925.92
8.1.270.0070.00023.99
8.1.260.0070.00026.35
8.1.250.0000.00928.09
8.1.240.0000.00922.51
8.1.230.0040.00720.85
8.1.220.0080.00018.77
8.1.210.0040.00418.93
8.1.200.0060.00317.35
8.1.190.0040.00417.41
8.1.180.0050.00318.10
8.1.170.0000.00818.51
8.1.160.0070.00018.85
8.1.150.0050.00318.70
8.1.140.0040.00417.38
8.1.130.0000.00717.73
8.1.120.0040.00417.33
8.1.110.0030.00617.38
8.1.100.0040.00417.32
8.1.90.0040.00417.36
8.1.80.0000.00717.32
8.1.70.0030.00317.32
8.1.60.0100.00017.62
8.1.50.0030.00617.55
8.1.40.0040.00417.43
8.1.30.0020.00517.69
8.1.20.0000.00917.64
8.1.10.0040.00417.61
8.1.00.0000.00717.55
8.0.300.0040.00419.86
8.0.290.0040.00417.03
8.0.280.0000.00718.46
8.0.270.0030.00517.20
8.0.260.0030.00316.84
8.0.250.0020.00517.07
8.0.240.0060.00317.10
8.0.230.0040.00417.02
8.0.220.0040.00416.88
8.0.210.0000.00716.99
8.0.200.0000.00616.93
8.0.190.0030.00317.04
8.0.180.0040.00416.96
8.0.170.0040.00417.05
8.0.160.0000.00717.03
8.0.150.0080.00017.03
8.0.140.0080.00416.95
8.0.130.0030.00313.46
8.0.120.0080.00314.28
8.0.110.0040.00614.32
8.0.100.0050.00614.30
8.0.90.0050.00614.26
8.0.80.0080.00514.28
8.0.70.0070.00414.23
8.0.60.0070.00414.27
8.0.50.0070.00514.24
8.0.30.0070.00714.84
8.0.20.0070.00714.99
8.0.10.0070.00314.32
8.0.00.0060.00714.73
7.4.330.0030.00314.91
7.4.320.0000.00716.48
7.4.300.0060.00016.63
7.4.290.0000.00816.42
7.4.280.0040.00416.66
7.4.270.0070.00016.64
7.4.260.0030.00313.29
7.4.250.0060.00514.12
7.4.240.0090.00314.09
7.4.230.0060.00614.11
7.4.220.0060.00814.07
7.4.210.0080.00615.13
7.4.200.0050.00514.07
7.4.190.0080.00314.18
7.4.180.0080.00513.42
7.4.160.0110.00214.15
7.4.150.0100.00414.30
7.4.140.0100.00815.09
7.4.130.0060.00714.51
7.4.120.0100.00414.51
7.4.110.0090.00314.04
7.4.100.0110.00314.19
7.4.90.0110.00314.06
7.4.80.0120.00415.03
7.4.70.0090.00714.45
7.4.60.0090.00614.51
7.4.50.0080.00614.35
7.4.40.0070.00815.70
7.4.30.0080.00814.42
7.4.20.0100.00513.90
7.4.10.0090.00513.88
7.4.00.0050.00914.05
7.3.330.0020.00213.45
7.3.320.0100.00313.30
7.3.310.0060.00514.05
7.3.300.0060.00414.12
7.3.290.0090.00214.11
7.3.280.0090.00514.88
7.3.270.0080.00514.35
7.3.260.0080.00615.75
7.3.250.0080.00714.59
7.3.240.0090.00414.09
7.3.230.0060.00414.10
7.3.220.0100.00013.20
7.3.210.0080.00313.97
7.3.200.0090.00514.97
7.3.190.0080.00614.47
7.3.180.0080.00514.42
7.3.170.0080.00514.44
7.3.160.0050.00914.50
7.3.150.0090.00613.92
7.3.140.0080.00513.94
7.3.130.0070.00614.03
7.3.120.0070.00714.04
7.3.110.0070.00413.87
7.3.100.0070.00613.86
7.3.90.0080.00514.04
7.3.80.0050.00814.00
7.3.70.0070.00714.00
7.3.60.0090.00513.94
7.3.50.0100.00514.07
7.3.40.0070.00614.18
7.3.30.0070.00614.04
7.3.20.0060.00715.26
7.3.10.0070.00815.48
7.3.00.0070.00715.67
7.2.340.0050.00713.33
7.2.330.0080.00814.13
7.2.320.0100.00514.03
7.2.310.0090.00714.68
7.2.300.0110.00414.58
7.2.290.0070.00914.55
7.2.280.0100.00614.08
7.2.270.0110.00414.07
7.2.260.0090.00614.13
7.2.250.0100.00514.08
7.2.240.0080.00714.06
7.2.230.0080.00714.10
7.2.220.0100.00614.05
7.2.210.0060.00814.10
7.2.200.0120.00514.15
7.2.190.0090.00714.08
7.2.180.0110.00514.07
7.2.170.0110.00414.11
7.2.160.0090.00714.11
7.2.150.0160.00315.50
7.2.140.0110.00615.53
7.2.130.0080.00615.96
7.2.120.0080.00815.86
7.2.110.0100.00515.87
7.2.100.0110.00615.90
7.2.90.0100.00715.93
7.2.80.0090.00515.86
7.2.70.0060.00915.86
7.2.60.0080.00616.03
7.2.50.0120.00815.82
7.2.40.0080.00715.90
7.2.30.0090.00615.88
7.2.20.0080.00815.97
7.2.10.0110.00415.95
7.2.00.0090.00616.35
7.1.330.0110.00414.57
7.1.320.0110.00414.59
7.1.310.0100.00414.58
7.1.300.0110.00414.59
7.1.290.0110.00614.67
7.1.280.0080.00814.62
7.1.270.0080.00714.62
7.1.260.0050.00914.57
7.1.250.0070.00614.94
7.1.240.0100.00514.81
7.1.230.0110.00314.77
7.1.220.0100.00414.82
7.1.210.0070.00714.82
7.1.200.0070.00814.99
7.1.190.0100.00414.79
7.1.180.0080.00514.76
7.1.170.0110.00314.79
7.1.160.0110.00414.72
7.1.150.0070.00614.79
7.1.140.0100.00414.84
7.1.130.0070.00814.82
7.1.120.0180.00414.72
7.1.110.0090.00614.83
7.1.100.0070.00715.40
7.1.90.0100.00514.75
7.1.80.0080.00514.84
7.1.70.0080.00615.17
7.1.60.0100.00515.54
7.1.50.0070.00915.11
7.1.40.0060.00914.82
7.1.30.0110.00414.89
7.1.20.0090.00514.80
7.1.10.0100.00314.78
7.1.00.0080.01316.11
7.0.330.0080.00514.58
7.0.320.0100.00314.52
7.0.310.0100.00514.50
7.0.300.0090.00614.48
7.0.290.0110.00414.66
7.0.280.0080.00514.58
7.0.270.0100.00514.40
7.0.260.0050.00814.57
7.0.250.0110.00314.62
7.0.240.0060.00714.53
7.0.230.0100.00414.57
7.0.220.0100.00514.57
7.0.210.0080.00614.59
7.0.200.0070.00614.80
7.0.190.0080.00714.52
7.0.180.0190.00714.58
7.0.170.0100.00514.61
7.0.160.0100.00514.49
7.0.150.0110.00314.59
7.0.140.0060.01915.82
7.0.130.0060.00714.59
7.0.120.0130.00214.57
7.0.110.0090.00614.53
7.0.100.0090.01715.43
7.0.90.0070.02015.40
7.0.80.0090.01915.46
7.0.70.0090.01515.41
7.0.60.0100.01015.51
7.0.50.0120.01615.43
7.0.40.0070.01915.14
7.0.30.0100.01815.17
7.0.20.0120.01615.10
7.0.10.0100.01615.15
7.0.00.0060.01515.13
5.6.400.0080.00713.38
5.6.390.0090.00513.52
5.6.380.0080.00813.66
5.6.370.0090.00613.58
5.6.360.0100.00613.57
5.6.350.0110.00413.58
5.6.340.0090.00613.63
5.6.330.0100.00313.66
5.6.320.0080.00713.61
5.6.310.0060.00813.42
5.6.300.0090.00613.51
5.6.290.0080.00713.58
5.6.280.0090.01714.76
5.6.270.0090.00613.52
5.6.260.0090.00613.49
5.6.250.0090.01714.79
5.6.240.0080.01914.80
5.6.230.0120.01614.92
5.6.220.0090.01914.87
5.6.210.0090.01714.86
5.6.200.0120.01714.91
5.6.190.0110.01514.90
5.6.180.0080.01414.83
5.6.170.0090.01814.88
5.6.160.0080.01914.81
5.6.150.0090.01614.95
5.6.140.0080.01914.88
5.6.130.0100.01614.82
5.6.120.0100.01514.93
5.6.110.0070.01414.85
5.6.100.0090.01914.83
5.6.90.0070.02014.70
5.6.80.0070.01914.65
5.6.70.0070.01914.67
5.6.60.0070.01914.78
5.6.50.0080.01814.61
5.6.40.0060.02014.73
5.6.30.0090.01814.79
5.6.20.0090.01714.76
5.6.10.0090.01714.69
5.6.00.0090.01814.67
5.5.380.0100.01714.18
5.5.370.0080.01914.24
5.5.360.0060.01814.16
5.5.350.0080.01814.12
5.5.340.0110.01014.14
5.5.330.0080.01214.15
5.5.320.0060.02014.19
5.5.310.0090.01714.22
5.5.300.0090.01514.15
5.5.290.0070.01914.16
5.5.280.0080.01714.23
5.5.270.0100.01714.33
5.5.260.0080.01714.16
5.5.250.0080.01614.08
5.5.240.0100.01414.14
5.5.230.0090.01714.11
5.5.220.0100.01414.11
5.5.210.0080.01514.10
5.5.200.0080.01714.13
5.5.190.0100.01014.06
5.5.180.0090.01714.15
5.5.170.0090.00412.82
5.5.160.0080.01614.05
5.5.150.0080.01313.96
5.5.140.0070.01913.99
5.5.130.0070.01713.97
5.5.120.0080.01313.99
5.5.110.0070.01513.99
5.5.100.0070.01814.07
5.5.90.0070.01713.96
5.5.80.0070.01814.00
5.5.70.0100.01614.16
5.5.60.0050.02014.04
5.5.50.0080.01714.06
5.5.40.0050.01814.05
5.5.30.0100.01014.06
5.5.20.0060.01914.13
5.5.10.0090.01214.13
5.5.00.0080.01713.99
5.4.450.0060.01513.47
5.4.440.0070.01513.37
5.4.430.0080.01613.46
5.4.420.0070.01613.41
5.4.410.0090.01513.32
5.4.400.0090.01513.29
5.4.390.0080.01613.38
5.4.380.0080.01613.32
5.4.370.0090.01313.38
5.4.360.0090.01513.32
5.4.350.0110.01213.22
5.4.340.0080.01613.35
5.4.330.0090.00412.16
5.4.320.0060.01713.45
5.4.310.0080.01513.39
5.4.300.0050.01713.37
5.4.290.0090.01513.26
5.4.280.0090.01513.27
5.4.270.0080.01613.45
5.4.260.0080.01613.35
5.4.250.0060.01713.18
5.4.240.0090.01513.33
5.4.230.0070.01613.27
5.4.220.0090.01013.21
5.4.210.0060.01313.27
5.4.200.0090.01513.32
5.4.190.0080.01613.24
5.4.180.0070.01813.30
5.4.170.0060.01913.35
5.4.160.0070.01513.30
5.4.150.0050.01313.32
5.4.140.0090.01512.97
5.4.130.0050.01812.96
5.4.120.0080.01512.94
5.4.110.0090.01613.02
5.4.100.0070.01612.95
5.4.90.0070.01612.95
5.4.80.0070.01613.00
5.4.70.0080.01312.87
5.4.60.0080.01212.96
5.4.50.0080.01612.80
5.4.40.0070.01412.88
5.4.30.0050.01912.92
5.4.20.0060.01813.00
5.4.10.0060.01712.92
5.4.00.0050.01712.68
5.3.290.0070.01712.98
5.3.280.0080.01412.93
5.3.270.0060.01712.89
5.3.260.0050.01813.01
5.3.250.0060.01412.95
5.3.240.0080.01412.87
5.3.230.0060.01112.92
5.3.220.0070.01612.79
5.3.210.0050.01912.80
5.3.200.0080.01512.76
5.3.190.0060.01812.78
5.3.180.0050.01412.99
5.3.170.0050.01912.95
5.3.160.0060.01413.04
5.3.150.0080.01212.91
5.3.140.0070.01612.90
5.3.130.0060.01312.85
5.3.120.0070.01712.94
5.3.110.0070.01212.95
5.3.100.0070.01212.85
5.3.90.0070.01612.93
5.3.80.0060.01612.76
5.3.70.0050.01712.71
5.3.60.0050.01212.73
5.3.50.0050.01712.82
5.3.40.0060.01512.81
5.3.30.0060.01712.78
5.3.20.0060.01012.77
5.3.10.0070.01512.61
5.3.00.0020.02012.56
5.2.170.0050.01411.68
5.2.160.0050.01411.55
5.2.150.0030.01511.68
5.2.140.0050.01211.58
5.2.130.0040.01511.62
5.2.120.0040.01411.59
5.2.110.0050.01511.57
5.2.100.0050.01411.50
5.2.90.0050.01311.54
5.2.80.0050.01411.50
5.2.70.0060.01311.53
5.2.60.0040.01311.52
5.2.50.0060.01411.47
5.2.40.0050.01311.51
5.2.30.0050.01311.57
5.2.20.0050.01511.42
5.2.10.0070.01211.36
5.2.00.0050.01411.36
5.1.60.0050.01211.09
5.1.50.0060.01111.05
5.1.40.0040.01311.11
5.1.30.0060.01211.11
5.1.20.0050.00911.06
5.1.10.0030.01311.07
5.1.00.0050.01311.05
5.0.50.0050.01010.78
5.0.40.0060.01010.78
5.0.30.0050.01010.78
5.0.20.0030.00910.78
5.0.10.0040.01010.78
5.0.00.0040.01310.78
4.4.90.0010.00910.78
4.4.80.0020.00710.78
4.4.70.0010.00910.78
4.4.60.0030.00610.78
4.4.50.0020.00810.78
4.4.40.0020.01110.78
4.4.30.0020.00810.78
4.4.20.0010.00910.78
4.4.10.0030.00610.78
4.4.00.0030.01110.78
4.3.110.0030.00510.78
4.3.100.0020.00710.78
4.3.90.0030.00710.78
4.3.80.0040.00910.78
4.3.70.0030.00510.78
4.3.60.0030.00710.78
4.3.50.0020.00810.78
4.3.40.0020.01110.78
4.3.30.0020.00610.78
4.3.20.0030.00710.78
4.3.10.0030.00710.78
4.3.00.0010.00910.78

preferences:
41.39 ms | 401 KiB | 5 Q