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('/tmp'));

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.0140.00425.92
8.3.50.0030.01025.92
8.3.40.0060.01225.92
8.2.180.0040.01125.92
8.2.170.0170.00025.92
8.1.280.0110.00325.92
8.0.120.0150.00917.88
8.0.110.0110.01517.91
8.0.100.0140.01217.91
8.0.90.0130.01417.87
8.0.80.0180.01117.93
8.0.70.0150.01117.89
8.0.60.0150.01217.91
8.0.50.0170.01117.89
8.0.30.0170.01317.84
8.0.20.0180.01117.92
8.0.10.0180.01018.02
8.0.00.0080.01617.76
7.4.250.0190.01017.73
7.4.240.0110.01517.69
7.4.230.0190.01017.77
7.4.220.0190.01117.70
7.4.210.0100.01317.30
7.4.200.0170.00917.69
7.4.190.0120.01217.75
7.4.180.0170.01718.15
7.4.160.0170.01317.80
7.4.150.0180.01117.94
7.4.140.0130.01417.96
7.4.130.0160.01317.48
7.4.120.0150.01017.46
7.4.110.0130.01717.70
7.4.100.0110.01717.71
7.4.90.0160.01917.75
7.4.80.0170.01017.98
7.4.70.0160.01217.43
7.4.60.0170.00917.36
7.4.50.0150.01217.29
7.4.40.0090.01718.33
7.4.30.0150.01217.25
7.4.20.0180.01217.55
7.4.10.0160.01217.43
7.4.00.0180.01217.08
7.3.320.0230.02120.66
7.3.310.0140.01217.69
7.3.300.0150.01117.76
7.3.290.0160.01217.76
7.3.280.0110.01417.41
7.3.270.0170.01218.05
7.3.260.0150.01318.25
7.3.250.0160.01217.59
7.3.240.0220.00817.75
7.3.230.0160.01417.86
7.3.220.0240.00818.04
7.3.210.0160.01317.76
7.3.200.0170.01118.03
7.3.190.0120.01717.48
7.3.180.0140.01417.41
7.3.170.0150.01117.43
7.3.160.0160.01117.39
7.3.150.0180.01417.62
7.3.140.0130.01517.62
7.3.130.0130.01717.58
7.3.120.0080.01817.01
7.3.110.0180.01217.52
7.3.100.0140.01317.61
7.3.90.0140.01817.75
7.3.80.0160.01517.59
7.3.70.0130.01717.69
7.3.60.0190.01217.58
7.3.50.0190.00917.66
7.3.40.0080.02017.66
7.3.30.0140.01517.67
7.3.20.0110.01318.41
7.3.10.0160.01218.40
7.3.00.0200.01218.32
7.2.340.0210.01318.33
7.2.330.0190.01317.90
7.2.320.0190.01317.90
7.2.310.0160.01517.65
7.2.300.0150.01317.75
7.2.290.0180.01317.69
7.2.280.0180.01117.89
7.2.270.0180.01517.83
7.2.260.0180.01518.00
7.2.250.0180.01417.86
7.2.240.0200.01317.81
7.2.230.0160.01517.92
7.2.220.0220.01117.95
7.2.210.0200.01217.89
7.2.200.0210.01218.01
7.2.190.0190.01217.84
7.2.180.0190.01317.88
7.2.170.0160.01517.95
7.2.160.0190.01517.97
7.2.150.0150.01718.69
7.2.140.0170.01418.68
7.2.130.0190.00918.88
7.2.120.0230.01018.85
7.2.110.0170.01418.81
7.2.100.0170.01518.91
7.2.90.0160.01418.79
7.2.80.0130.01418.41
7.2.70.0190.01218.79
7.2.60.0160.01118.40
7.2.50.0120.02018.71
7.2.40.0160.01518.72
7.2.30.0200.01218.82
7.2.20.0190.01318.76
7.2.10.0160.01418.76
7.2.00.0110.01718.89
7.1.330.0200.01017.72
7.1.320.0220.01017.71
7.1.310.0190.01117.78
7.1.300.0200.01017.70
7.1.290.0140.01817.74
7.1.280.0180.01417.71
7.1.270.0170.01317.77
7.1.260.0170.01417.71
7.1.250.0140.01617.72
7.1.240.0170.01517.70
7.1.230.0180.01117.72
7.1.220.0160.01417.74
7.1.210.0170.01317.77
7.1.200.0130.01217.39
7.1.190.0200.01117.67
7.1.180.0190.01017.71
7.1.170.0160.01217.64
7.1.160.0200.00817.71
7.1.150.0160.01317.59
7.1.140.0190.01117.67
7.1.130.0160.01317.65
7.1.120.0170.01217.56
7.1.110.0160.01217.72
7.1.100.0130.01317.79
7.1.90.0190.01317.75
7.1.80.0150.01417.80
7.1.70.0160.01017.62
7.1.60.0140.01218.07
7.1.50.0190.01217.49
7.1.40.0160.01317.83
7.1.30.0170.01317.69
7.1.20.0180.01317.67
7.1.10.0160.01317.71
7.1.00.0110.02018.71
7.0.330.0110.01716.61
7.0.320.0130.01516.62
7.0.310.0170.01416.47
7.0.300.0170.01216.54
7.0.290.0160.01116.59
7.0.280.0180.00916.55
7.0.270.0160.01316.64
7.0.260.0140.01416.57
7.0.250.0190.01216.72
7.0.240.0220.00816.75
7.0.230.0190.01116.75
7.0.220.0170.01416.65
7.0.210.0130.01616.71
7.0.200.0180.01216.77
7.0.190.0200.01216.79
7.0.180.0140.01616.72
7.0.170.0170.01416.69
7.0.160.0180.01516.65
7.0.150.0180.01416.61
7.0.140.0100.02416.52
7.0.130.0140.00514.58
7.0.120.0090.01014.65
7.0.110.0100.00814.64
7.0.100.0080.03216.09
7.0.90.0190.03116.58
7.0.80.0150.02916.45
7.0.70.0210.02916.47
7.0.60.0180.01916.57
7.0.50.0170.02316.58
7.0.40.0070.03316.54
7.0.30.0060.02916.55
7.0.20.0100.02016.50
7.0.10.0130.02216.50
7.0.00.0090.03016.45
5.6.400.0110.00614.39
5.6.390.0050.01514.21
5.6.380.0100.00814.43
5.6.370.0070.00914.31
5.6.360.0080.00814.22
5.6.350.0090.00614.33
5.6.340.0080.00814.39
5.6.330.0130.00614.40
5.6.320.0110.00614.48
5.6.310.0110.00514.37
5.6.300.0110.00814.23
5.6.290.0060.01014.36
5.6.280.0070.03016.51
5.6.270.0100.00614.13
5.6.260.0110.00614.24
5.6.250.0110.01916.40
5.6.240.0090.03116.59
5.6.230.0130.03016.51
5.6.220.0100.03116.45
5.6.210.0090.03016.54
5.6.200.0100.03316.74
5.6.190.0130.02116.68
5.6.180.0100.02816.70
5.6.170.0100.03416.57
5.6.160.0110.03016.71
5.6.150.0080.02116.63
5.6.140.0070.03216.70
5.6.130.0070.02116.62
5.6.120.0080.02116.62
5.6.110.0110.02116.61
5.6.100.0060.02616.54
5.6.90.0070.02916.62
5.6.80.0090.03116.32
5.6.70.0090.03316.36
5.6.60.0100.02816.32
5.6.50.0120.01816.42
5.6.40.0100.01916.31
5.6.30.0060.02916.38
5.6.20.0100.01716.37
5.6.10.0080.02816.43
5.6.00.0080.02316.31
5.5.380.0030.03216.43
5.5.370.0050.03516.40
5.5.360.0110.03216.46
5.5.350.0070.02216.32
5.5.340.0120.02616.51
5.5.330.0040.03516.54
5.5.320.0090.02716.52
5.5.310.0100.03216.50
5.5.300.0080.02116.54
5.5.290.0090.01916.51
5.5.280.0100.02216.52
5.5.270.0070.02116.44
5.5.260.0110.03116.42
5.5.250.0110.01916.43
5.5.240.0060.03116.33
5.5.230.0110.02816.38
5.5.220.0080.03016.30
5.5.210.0110.01716.27
5.5.200.0100.01816.39
5.5.190.0080.02916.32
5.5.180.0130.02516.26
5.5.170.0090.00814.36
5.5.160.0040.03416.29
5.5.150.0080.03416.24
5.5.140.0070.03316.21
5.5.130.0070.02216.27
5.5.120.0080.01816.14
5.5.110.0050.02216.29
5.5.100.0090.01916.27
5.5.90.0100.02416.14
5.5.80.0070.03016.30
5.5.70.0100.01916.23
5.5.60.0060.02216.23
5.5.50.0100.03016.22
5.5.40.0080.02616.29
5.5.30.0100.03116.25
5.5.20.0070.03316.13
5.5.10.0090.03116.10
5.5.00.0110.02616.18
5.4.450.0120.01514.85
5.4.440.0070.02814.89
5.4.430.0120.02814.86
5.4.420.0100.02114.96
5.4.410.0070.01714.71
5.4.400.0080.02914.70
5.4.390.0080.03014.87
5.4.380.0060.03114.62
5.4.370.0090.01714.69
5.4.360.0090.02014.79
5.4.350.0110.03114.84
5.4.340.0090.01714.63
5.4.330.0070.00812.80
5.4.320.0070.01714.77
5.4.310.0070.02314.78
5.4.300.0070.01714.79
5.4.290.0100.02514.84
5.4.280.0060.02114.68
5.4.270.0070.02614.64
5.4.260.0070.01814.87
5.4.250.0060.02914.79
5.4.240.0090.02614.71
5.4.230.0060.01914.76
5.4.220.0080.02714.68
5.4.210.0040.02114.68
5.4.200.0070.03214.70
5.4.190.0110.02514.71
5.4.180.0080.02914.81
5.4.170.0110.02514.72
5.4.160.0060.02814.76
5.4.150.0040.02014.88
5.4.140.0090.01613.88
5.4.130.0080.02413.85
5.4.120.0040.01814.05
5.4.110.0060.01713.93
5.4.100.0100.01414.10
5.4.90.0060.01814.03
5.4.80.0110.02113.95
5.4.70.0040.02813.94
5.4.60.0040.02513.99
5.4.50.0070.01613.99
5.4.40.0130.02513.97
5.4.30.0070.01714.04
5.4.20.0080.01613.87
5.4.10.0060.02014.10
5.4.00.0060.02813.70
5.3.290.0080.03013.83
5.3.280.0080.01713.75
5.3.270.0060.03113.79
5.3.260.0070.02813.79
5.3.250.0050.03213.81
5.3.240.0110.01713.78
5.3.230.0100.02313.74
5.3.220.0050.01813.59
5.3.210.0060.02013.72
5.3.200.0060.02613.65
5.3.190.0050.02013.73
5.3.180.0060.01813.70
5.3.170.0070.03013.79
5.3.160.0050.02113.86
5.3.150.0050.01713.77
5.3.140.0040.02213.71
5.3.130.0100.02913.77
5.3.120.0060.02913.75
5.3.110.0030.03313.71
5.3.100.0090.01613.72
5.3.90.0080.02713.72
5.3.80.0060.02113.67
5.3.70.0070.02713.65
5.3.60.0080.03113.71
5.3.50.0040.03113.71
5.3.40.0110.02113.66
5.3.30.0090.02813.78
5.3.20.0100.02513.73
5.3.10.0060.02113.59
5.3.00.0100.02113.59
5.2.170.0060.02112.98
5.2.160.0040.01513.07
5.2.150.0040.02013.12
5.2.140.0040.02612.92
5.2.130.0070.02312.93
5.2.120.0050.02413.00
5.2.110.0050.01613.04
5.2.100.0050.01513.09
5.2.90.0040.02112.99
5.2.80.0040.02412.92
5.2.70.0100.02212.85
5.2.60.0040.01512.82
5.2.50.0050.01812.83
5.2.40.0090.01213.04
5.2.30.0100.01212.95
5.2.20.0070.02312.86
5.2.10.0070.02412.79
5.2.00.0030.02512.76
5.1.60.0030.02112.60
5.1.50.0040.02112.62
5.1.40.0030.02012.55
5.1.30.0030.02212.71
5.1.20.0040.01712.69
5.1.10.0100.01412.59
5.1.00.0040.02312.57
5.0.50.0040.01812.36
5.0.40.0040.01212.36
5.0.30.0070.02312.36
5.0.20.0040.01712.36
5.0.10.0040.01312.36
5.0.00.0030.02512.36
4.4.90.0010.01212.36
4.4.80.0020.00712.36
4.4.70.0020.01112.36
4.4.60.0030.00912.36
4.4.50.0050.00812.36
4.4.40.0050.01012.36
4.4.30.0050.01312.36
4.4.20.0030.01312.36
4.4.10.0070.00412.36
4.4.00.0020.02212.36
4.3.110.0040.00712.36
4.3.100.0040.01412.36
4.3.90.0030.00912.36
4.3.80.0000.02212.36
4.3.70.0050.00912.36
4.3.60.0050.00912.36
4.3.50.0030.00812.36
4.3.40.0010.02012.36
4.3.30.0030.00912.36
4.3.20.0050.00912.36
4.3.10.0030.00712.36
4.3.00.0040.01312.36

preferences:
35.16 ms | 401 KiB | 5 Q