3v4l.org

run code in 300+ PHP versions simultaneously
<?php function permission($filename) { $perms = fileperms($filename); if (($perms & 0xC000) == 0xC000) { $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { $info = 'p'; } else { $info = 'u'; } // владелец $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); // группа $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); // все $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } function dir_list($dir) { if ($dir[strlen($dir)-1] != '/') $dir .= '/'; if (!is_dir($dir)) return array(); $dir_handle = opendir($dir); $dir_objects = array(); while ($object = readdir($dir_handle)) if (!in_array($object, array('.','..'))) { $filename = $dir . $object; $file_object = array( 'name' => $object, 'size' => filesize($filename), 'perm' => permission($filename), 'type' => filetype($filename), 'time' => date("d F Y H:i:s", filemtime($filename)) ); $dir_objects[] = $file_object; } return $dir_objects; } print_r(dir_list('/'));

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.0000.01518.68
8.3.50.0080.00721.92
8.3.40.0030.01219.02
8.3.30.0110.00418.71
8.3.20.0040.00418.96
8.3.10.0040.00420.92
8.3.00.0040.00423.58
8.2.180.0070.00716.63
8.2.170.0100.00322.96
8.2.160.0070.00720.57
8.2.150.0070.00024.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0050.00321.12
8.2.110.0000.00920.44
8.2.100.0070.00418.03
8.2.90.0000.00819.22
8.2.80.0030.00517.97
8.2.70.0030.00617.75
8.2.60.0060.00317.80
8.2.50.0090.00018.07
8.2.40.0070.00018.22
8.2.30.0000.00819.90
8.2.20.0060.00317.75
8.2.10.0040.00417.71
8.2.00.0060.00317.66
8.1.280.0110.00725.92
8.1.270.0000.00723.99
8.1.260.0100.00726.35
8.1.250.0070.00028.09
8.1.240.0040.00422.14
8.1.230.0110.00017.42
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.25
8.1.190.0000.00717.54
8.1.180.0030.00618.10
8.1.170.0050.00318.66
8.1.160.0050.00318.87
8.1.150.0000.00818.67
8.1.140.0040.00717.41
8.1.130.0000.00717.72
8.1.120.0030.00417.47
8.1.110.0020.00517.47
8.1.100.0000.00817.32
8.1.90.0000.00717.39
8.1.80.0030.00517.50
8.1.70.0050.00317.32
8.1.60.0000.00917.56
8.1.50.0030.00617.34
8.1.40.0040.00417.51
8.1.30.0000.00817.49
8.1.20.0030.00517.59
8.1.10.0060.00317.60
8.1.00.0030.00617.43
8.0.300.0050.00218.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0000.00717.11
8.0.260.0030.00316.77
8.0.250.0000.00816.98
8.0.240.0030.00717.00
8.0.230.0040.00416.96
8.0.220.0080.00016.93
8.0.210.0040.00416.84
8.0.200.0030.00616.99
8.0.190.0080.00016.89
8.0.180.0040.00416.84
8.0.170.0040.00416.95
8.0.160.0050.00216.93
8.0.150.0040.00416.86
8.0.140.0100.00016.88
8.0.130.0000.00613.40
8.0.120.0040.00414.22
8.0.110.0040.00614.27
8.0.100.0050.00514.25
8.0.90.0050.00514.27
8.0.80.0070.00514.26
8.0.70.0040.00614.27
8.0.60.0050.00514.23
8.0.50.0040.00614.21
8.0.30.0060.00714.86
8.0.20.0050.00714.98
8.0.10.0050.00514.40
8.0.00.0030.00814.76
7.4.330.0030.00314.84
7.4.320.0030.00316.38
7.4.300.0030.00316.47
7.4.290.0030.00316.44
7.4.280.0070.00016.51
7.4.270.0000.00716.55
7.4.260.0050.00013.34
7.4.250.0080.00314.13
7.4.240.0100.00214.04
7.4.230.0080.00314.11
7.4.220.0040.01114.06
7.4.210.0050.00915.12
7.4.200.0040.00614.11
7.4.190.0040.00514.10
7.4.180.0080.00213.30
7.4.160.0080.00414.14
7.4.150.0090.00314.29
7.4.140.0050.00815.08
7.4.130.0080.00614.56
7.4.120.0080.00514.56
7.4.110.0090.00313.99
7.4.100.0090.00414.17
7.4.90.0080.00414.06
7.4.80.0110.00515.11
7.4.70.0110.00514.56
7.4.60.0100.00514.42
7.4.50.0060.00514.43
7.4.40.0060.00815.52
7.4.30.0090.00514.36
7.4.20.0090.00513.98
7.4.10.0080.00714.02
7.4.00.0090.00714.44
7.3.330.0030.00313.54
7.3.320.0110.00213.40
7.3.310.0070.00314.20
7.3.300.0010.00814.08
7.3.290.0070.00414.19
7.3.280.0080.00614.90
7.3.270.0080.00514.32
7.3.260.0080.00615.39
7.3.250.0100.00514.73
7.3.240.0080.00514.25
7.3.230.0100.00514.12
7.3.220.0080.00413.38
7.3.210.0100.00314.13
7.3.200.0080.00715.12
7.3.190.0070.00514.52
7.3.180.0080.00614.57
7.3.170.0100.00314.54
7.3.160.0070.00714.51
7.3.150.0070.00513.95
7.3.140.0060.00814.09
7.3.130.0100.00514.13
7.3.120.0080.00814.39
7.3.110.0080.00814.18
7.3.100.0090.00614.35
7.3.90.0070.00514.35
7.3.80.0080.00614.30
7.3.70.0050.00714.37
7.3.60.0100.00414.29
7.3.50.0090.00514.46
7.3.40.0050.00814.46
7.3.30.0080.00414.39
7.3.20.0090.00715.83
7.3.10.0060.00815.83
7.3.00.0070.00815.90
7.2.340.0080.00613.54
7.2.330.0080.00614.26
7.2.320.0090.00714.27
7.2.310.0100.00714.78
7.2.300.0110.00514.79
7.2.290.0100.00614.82
7.2.280.0070.00814.26
7.2.270.0120.00414.27
7.2.260.0080.00714.37
7.2.250.0120.00614.51
7.2.240.0090.00814.59
7.2.230.0080.00714.62
7.2.220.0090.00614.63
7.2.210.0080.00614.57
7.2.200.0090.00514.65
7.2.190.0110.00414.62
7.2.180.0080.00714.59
7.2.170.0070.00814.58
7.2.160.0090.00614.43
7.2.150.0100.00615.89
7.2.140.0110.00515.89
7.2.130.0060.00916.02
7.2.120.0090.00515.93
7.2.110.0080.00715.96
7.2.100.0090.00715.98
7.2.90.0100.00715.87
7.2.80.0180.00515.82
7.2.70.0070.00815.94
7.2.60.0100.00615.89
7.2.50.0090.00715.80
7.2.40.0120.00515.93
7.2.30.0050.00915.96
7.2.20.0090.00515.94
7.2.10.0110.00416.05
7.2.00.0080.00616.44
7.1.330.0100.00515.10
7.1.320.0060.00815.08
7.1.310.0080.00615.04
7.1.300.0070.00715.06
7.1.290.0080.00615.02
7.1.280.0060.00814.98
7.1.270.0090.00515.11
7.1.260.0080.00615.00
7.1.250.0070.00714.91
7.1.240.0100.00414.91
7.1.230.0060.00714.88
7.1.220.0070.00814.95
7.1.210.0080.00714.89
7.1.200.0050.00815.02
7.1.190.0100.00314.90
7.1.180.0090.00514.87
7.1.170.0090.00414.91
7.1.160.0100.00614.87
7.1.150.0070.00714.79
7.1.140.0060.00614.79
7.1.130.0090.00414.89
7.1.120.0070.00614.81
7.1.110.0080.00714.77
7.1.100.0070.00615.48
7.1.90.0110.00614.92
7.1.80.0060.00914.86
7.1.70.0090.00415.24
7.1.60.0090.00715.71
7.1.50.0090.00515.18
7.1.40.0110.00414.88
7.1.30.0100.00514.89
7.1.20.0060.00914.86
7.1.10.0080.00514.86
7.1.00.0090.01616.04
7.0.330.0090.00514.67
7.0.320.0060.00914.57
7.0.310.0090.00414.59
7.0.300.0110.00314.57
7.0.290.0110.00514.70
7.0.280.0110.00314.64
7.0.270.0130.00314.65
7.0.260.0090.00514.71
7.0.250.0070.00614.83
7.0.240.0080.00614.82
7.0.230.0100.00514.78
7.0.220.0100.00514.71
7.0.210.0080.00614.87
7.0.200.0070.00515.09
7.0.190.0110.00314.78
7.0.180.0100.00414.74
7.0.170.0070.00714.73
7.0.160.0060.00914.72
7.0.150.0080.00414.67
7.0.140.0060.01815.94
7.0.130.0080.00614.68
7.0.120.0080.00614.74
7.0.110.0090.00714.63
7.0.100.0070.00714.81
7.0.90.0100.00414.66
7.0.80.0080.01115.50
7.0.70.0090.01115.53
7.0.60.0090.01915.58
7.0.50.0190.01515.61
7.0.40.0100.01615.28
7.0.30.0080.01715.27
7.0.20.0070.01415.24
7.0.10.0090.01815.29
7.0.00.0080.01915.17
5.6.400.0100.00413.72
5.6.390.0100.00513.69
5.6.380.0080.00613.79
5.6.370.0090.00613.67
5.6.360.0080.00613.71
5.6.350.0060.00713.73
5.6.340.0060.00813.72
5.6.330.0080.00713.66
5.6.320.0050.00913.80
5.6.310.0080.00713.79
5.6.300.0100.00513.66
5.6.290.0090.00513.69
5.6.280.0070.00613.66
5.6.270.0070.00713.80
5.6.260.0100.00613.61
5.6.250.0070.00613.74
5.6.240.0080.00513.96
5.6.230.0070.01215.03
5.6.220.0090.01214.96
5.6.210.0090.01815.01
5.6.200.0100.01815.09
5.6.190.0070.02115.01
5.6.180.0080.01815.09
5.6.170.0090.01715.01
5.6.160.0090.01915.02
5.6.150.0080.02015.12
5.6.140.0100.01514.96
5.6.130.0080.02015.02
5.6.120.0100.01215.00
5.6.110.0100.01814.94
5.6.100.0090.01214.90
5.6.90.0070.01314.92
5.6.80.0120.01414.86
5.6.70.0060.02014.78
5.6.60.0080.01614.83
5.6.50.0100.01714.78
5.6.40.0110.01714.84
5.6.30.0110.01814.83
5.6.20.0080.01414.88
5.6.10.0100.01514.87
5.6.00.0100.01414.81
5.5.380.0090.00613.95
5.5.370.0080.01114.89
5.5.360.0070.01314.90
5.5.350.0080.01614.78
5.5.340.0100.01614.92
5.5.330.0070.01814.90
5.5.320.0090.01914.97
5.5.310.0120.01714.92
5.5.300.0060.02114.92
5.5.290.0090.01314.98
5.5.280.0110.01514.96
5.5.270.0100.01814.96
5.5.260.0090.01814.91
5.5.250.0100.01714.99
5.5.240.0080.01814.81
5.5.230.0080.01314.77
5.5.220.0070.01814.80
5.5.210.0090.01614.83
5.5.200.0080.01914.76
5.5.190.0070.01714.84
5.5.180.0060.01414.82
5.5.170.0100.00613.62
5.5.160.0080.01914.78
5.5.150.0080.02114.76
5.5.140.0100.01614.71
5.5.130.0060.01514.70
5.5.120.0060.02014.72
5.5.110.0090.01814.81
5.5.100.0110.01314.83
5.5.90.0080.01814.72
5.5.80.0080.01914.77
5.5.70.0070.01914.78
5.5.60.0090.01914.80
5.5.50.0080.01714.72
5.5.40.0090.01214.78
5.5.30.0080.01914.76
5.5.20.0080.02014.76
5.5.10.0100.01814.75
5.5.00.0070.01814.71
5.4.450.0110.01713.86
5.4.440.0080.02013.85
5.4.430.0100.01113.89
5.4.420.0110.01613.89
5.4.410.0090.01513.86
5.4.400.0100.01113.76
5.4.390.0070.01913.72
5.4.380.0110.01313.72
5.4.370.0080.01613.77
5.4.360.0040.02013.81
5.4.350.0070.01913.75
5.4.340.0110.01813.75
5.4.330.0110.00612.74
5.4.320.0070.01513.70
5.4.310.0080.01813.74
5.4.300.0110.01413.76
5.4.290.0100.01713.69
5.4.280.0120.01713.82
5.4.270.0110.01613.77
5.4.260.0120.01613.79
5.4.250.0080.01913.76
5.4.240.0090.01813.70
5.4.230.0090.01813.60
5.4.220.0080.02013.64
5.4.210.0120.01613.69
5.4.200.0080.01813.73
5.4.190.0090.01513.69
5.4.180.0100.01213.69
5.4.170.0060.01413.74
5.4.160.0080.01813.78
5.4.150.0080.01513.63
5.4.140.0110.01613.33
5.4.130.0060.01813.46
5.4.120.0090.01013.39
5.4.110.0080.01713.39
5.4.100.0080.02113.41
5.4.90.0090.01813.44
5.4.80.0100.01413.45
5.4.70.0070.01413.49
5.4.60.0100.01513.49
5.4.50.0100.01013.37
5.4.40.0100.01613.37
5.4.30.0080.01613.53
5.4.20.0060.01513.37
5.4.10.0120.01313.40
5.4.00.0080.01713.24
5.3.290.0100.01813.42
5.3.280.0100.01713.34
5.3.270.0080.01413.52
5.3.260.0110.01513.53
5.3.250.0060.01913.44
5.3.240.0080.01813.41
5.3.230.0100.01413.39
5.3.220.0070.01813.24
5.3.210.0070.02113.29
5.3.200.0080.01913.31
5.3.190.0080.01513.41
5.3.180.0080.01713.42
5.3.170.0070.01213.46
5.3.160.0060.02013.37
5.3.150.0090.01713.42
5.3.140.0070.01813.47
5.3.130.0060.01913.38
5.3.120.0090.01213.39
5.3.110.0090.01713.49
5.3.100.0090.01013.32
5.3.90.0060.01213.35
5.3.80.0090.01713.19
5.3.70.0070.01213.20
5.3.60.0080.01713.20
5.3.50.0110.01613.29
5.3.40.0060.01813.29
5.3.30.0080.01613.24
5.3.20.0090.01813.20
5.3.10.0070.01413.10
5.3.00.0070.01113.03
5.2.170.0080.01511.89
5.2.160.0100.01612.04
5.2.150.0080.01612.03
5.2.140.0110.01311.98
5.2.130.0080.01511.91
5.2.120.0080.01711.84
5.2.110.0080.01211.93
5.2.100.0090.01411.85
5.2.90.0080.01511.83
5.2.80.0090.01611.85
5.2.70.0090.01611.89
5.2.60.0070.01711.77
5.2.50.0090.01511.77
5.2.40.0060.01811.85
5.2.30.0110.01511.76
5.2.20.0080.01611.72
5.2.10.0090.01511.63
5.2.00.0060.01511.49
5.1.60.0060.01611.03
5.1.50.0070.01410.93
5.1.40.0040.01411.06
5.1.30.0060.01311.33
5.1.20.0060.01611.19
5.1.10.0060.01411.18
5.1.00.0090.01211.14
5.0.50.0070.01010.36
5.0.40.0080.01010.36
5.0.30.0030.01610.33
5.0.20.0030.01410.33
5.0.10.0070.01110.33
5.0.00.0070.01510.33
4.4.90.0040.00910.33
4.4.80.0030.01010.33
4.4.70.0060.00610.33
4.4.60.0050.00510.33
4.4.50.0020.01010.33
4.4.40.0030.01010.33
4.4.30.0040.00910.33
4.4.20.0040.00710.33
4.4.10.0020.01110.33
4.4.00.0050.01310.33
4.3.110.0030.01110.33
4.3.100.0060.00710.33
4.3.90.0060.00710.33
4.3.80.0050.01210.33
4.3.70.0040.00910.33
4.3.60.0030.00810.33
4.3.50.0040.00810.33
4.3.40.0030.01210.33
4.3.30.0030.00910.33
4.3.20.0060.00810.33
4.3.10.0030.00910.33
4.3.00.0020.01010.33

preferences:
38.69 ms | 401 KiB | 5 Q