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; } ?> call: <?php print_r(dir_list('/proc')); ?>

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.00716.74
8.3.50.0030.01321.95
8.3.40.0190.00318.81
8.3.30.0070.01119.20
8.3.20.0000.00720.35
8.3.10.0040.00423.64
8.3.00.0000.00820.77
8.2.180.0120.00318.42
8.2.170.0150.00322.96
8.2.160.0100.00320.41
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0000.00926.16
8.2.120.0040.00420.94
8.2.110.0000.01022.12
8.2.100.0000.01217.78
8.2.90.0060.00319.13
8.2.80.0030.00517.97
8.2.70.0070.00317.63
8.2.60.0040.00417.89
8.2.50.0080.00318.07
8.2.40.0000.00819.79
8.2.30.0040.00418.31
8.2.20.0000.00817.78
8.2.10.0000.00718.16
8.2.00.0050.00317.61
8.1.280.0040.01125.92
8.1.270.0040.00423.79
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00623.86
8.1.230.0030.00719.22
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0090.00017.10
8.1.190.0060.00317.23
8.1.180.0060.00318.10
8.1.170.0080.00018.72
8.1.160.0030.00522.00
8.1.150.0040.00418.69
8.1.140.0050.00317.51
8.1.130.0070.00019.61
8.1.120.0040.00417.53
8.1.110.0030.00517.40
8.1.100.0070.00017.53
8.1.90.0070.00017.40
8.1.80.0040.00417.57
8.1.70.0030.00317.48
8.1.60.0000.00917.66
8.1.50.0040.00417.61
8.1.40.0100.00017.57
8.1.30.0030.00517.54
8.1.20.0000.00817.70
8.1.10.0080.00017.73
8.1.00.0020.00517.61
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0030.00318.37
8.0.270.0070.00017.31
8.0.260.0030.00317.35
8.0.250.0070.00017.09
8.0.240.0030.00617.11
8.0.230.0000.00716.98
8.0.220.0000.00717.03
8.0.210.0070.00016.91
8.0.200.0030.00317.04
8.0.190.0070.00017.02
8.0.180.0070.00016.98
8.0.170.0000.00817.04
8.0.160.0070.00017.14
8.0.150.0030.00616.95
8.0.140.0030.00616.98
8.0.130.0000.00513.46
8.0.120.0060.00214.31
8.0.110.0040.00414.27
8.0.100.0060.00214.31
8.0.90.0050.00414.34
8.0.80.0070.00514.35
8.0.70.0080.00414.25
8.0.60.0060.00614.28
8.0.50.0050.00614.33
8.0.30.0080.00814.83
8.0.20.0090.00615.01
8.0.10.0100.00114.42
8.0.00.0060.00714.83
7.4.330.0050.00015.26
7.4.320.0000.00816.64
7.4.300.0060.00016.52
7.4.290.0000.00716.55
7.4.280.0000.00716.69
7.4.270.0070.00016.57
7.4.260.0030.00616.61
7.4.250.0070.00614.13
7.4.240.0050.00614.70
7.4.230.0090.00214.15
7.4.220.0100.00514.14
7.4.210.0080.00514.09
7.4.200.0060.00414.17
7.4.190.0100.00213.42
7.4.180.0110.00113.33
7.4.160.0090.00414.18
7.4.150.0110.00214.35
7.4.140.0050.00915.12
7.4.130.0100.00414.61
7.4.120.0080.00614.60
7.4.110.0070.00714.10
7.4.100.0110.00414.21
7.4.90.0080.00514.16
7.4.80.0130.00914.81
7.4.70.0120.00314.13
7.4.60.0120.00414.18
7.4.50.0090.00314.06
7.4.40.0110.00214.00
7.4.30.0090.00514.07
7.4.20.0090.00313.24
7.4.10.0110.00113.23
7.4.00.0090.00213.24
7.3.330.0030.00313.52
7.3.320.0110.00313.39
7.3.310.0080.00414.19
7.3.300.0100.00114.16
7.3.290.0100.00514.19
7.3.280.0060.00814.98
7.3.270.0100.00414.45
7.3.260.0110.00414.20
7.3.250.0100.00614.59
7.3.240.0100.00414.21
7.3.230.0110.00514.18
7.3.220.0100.00413.20
7.3.210.0100.00614.12
7.3.200.0100.00714.81
7.3.190.0120.00414.01
7.3.180.0090.00514.13
7.3.170.0130.00314.14
7.3.160.0100.00514.18
7.3.150.0090.00413.39
7.3.140.0100.00313.31
7.3.130.0090.00213.31
7.3.120.0080.00213.23
7.3.110.0050.00513.26
7.3.100.0070.00513.18
7.3.90.0050.00513.58
7.3.80.0060.00313.33
7.3.70.0060.00313.47
7.3.60.0040.00513.47
7.3.50.0060.00413.39
7.3.40.0060.00413.37
7.3.30.0090.00213.34
7.3.20.0050.00715.31
7.3.10.0040.00615.16
7.3.00.0080.00115.17
7.2.340.0070.00613.50
7.2.330.0070.00814.31
7.2.320.0110.00414.31
7.2.310.0100.00414.36
7.2.300.0120.00314.37
7.2.290.0070.00814.34
7.2.280.0110.00313.53
7.2.270.0120.00213.45
7.2.260.0110.00313.45
7.2.250.0120.00113.50
7.2.240.0100.00313.53
7.2.230.0080.00513.51
7.2.220.0080.00513.50
7.2.210.0090.00413.47
7.2.200.0090.00513.63
7.2.190.0090.00413.51
7.2.180.0090.00413.52
7.2.170.0090.00413.56
7.2.160.0100.00313.56
7.2.150.0120.00115.31
7.2.140.0080.00415.37
7.2.130.0090.00515.54
7.2.120.0110.00215.44
7.2.110.0110.00215.36
7.2.100.0090.00415.49
7.2.90.0100.00415.36
7.2.80.0090.00515.31
7.2.70.0050.00815.43
7.2.60.0090.00415.42
7.2.50.0100.00315.41
7.2.40.0100.00415.31
7.2.30.0100.00415.34
7.2.20.0100.00415.41
7.2.10.0090.00615.37
7.2.00.0120.00215.43
7.1.330.0110.00214.48
7.1.320.0100.00414.42
7.1.310.0110.00114.29
7.1.300.0080.00414.48
7.1.290.0090.00314.31
7.1.280.0080.00514.42
7.1.270.0050.00914.39
7.1.260.0070.00514.41
7.1.250.0100.00414.29
7.1.240.0090.00414.38
7.1.230.0090.00314.39
7.1.220.0070.00714.46
7.1.210.0100.00314.43
7.1.200.0040.01014.33
7.1.190.0110.00214.31
7.1.180.0100.00214.35
7.1.170.0100.00214.29
7.1.160.0120.00114.30
7.1.150.0090.00414.36
7.1.140.0080.00614.41
7.1.130.0090.00514.31
7.1.120.0100.00414.33
7.1.110.0080.00514.34
7.1.100.0100.00314.28
7.1.90.0100.00214.32
7.1.80.0080.00514.33
7.1.70.0110.00214.38
7.1.60.0120.00214.50
7.1.50.0110.00314.42
7.1.40.0120.00214.44
7.1.30.0100.00314.40
7.1.20.0090.00414.40
7.1.10.0090.00414.32
7.1.00.0070.00614.26
7.0.330.0100.00314.26
7.0.320.0100.00314.24
7.0.310.0070.00614.29
7.0.300.0090.00414.23
7.0.290.0070.00614.22
7.0.280.0100.00214.23
7.0.270.0080.00414.16
7.0.260.0100.00214.25
7.0.250.0100.00314.41
7.0.240.0110.00114.43
7.0.230.0110.00214.38
7.0.220.0100.00314.41
7.0.210.0100.00314.40
7.0.200.0080.00414.44
7.0.190.0110.00114.38
7.0.180.0100.00214.38
7.0.170.0090.00314.51
7.0.160.0100.00214.36
7.0.150.0120.00114.31
7.0.140.0080.00414.32
7.0.130.0120.00014.48
7.0.120.0110.00114.37
7.0.110.0080.00414.20
7.0.100.0090.00314.47
7.0.90.0090.00314.21
7.0.80.0190.01715.61
7.0.70.0080.02515.68
7.0.60.0140.01815.73
7.0.50.0170.01515.67
7.0.40.0110.02515.76
7.0.30.0080.02615.60
7.0.20.0080.01915.67
7.0.10.0110.02115.74
7.0.00.0060.01715.69
5.6.400.0070.00412.84
5.6.390.0080.00412.82
5.6.380.0060.00512.86
5.6.370.0060.00612.95
5.6.360.0100.00212.96
5.6.350.0100.00312.90
5.6.340.0080.00412.79
5.6.330.0090.00312.88
5.6.320.0100.00212.84
5.6.310.0080.00413.06
5.6.300.0080.00412.83
5.6.290.0100.00112.77
5.6.280.0050.00712.97
5.6.270.0080.00412.93
5.6.260.0100.00112.83
5.6.250.0070.00512.87
5.6.240.0060.00512.97
5.6.230.0090.02414.92
5.6.220.0100.01815.02
5.6.210.0110.02114.94
5.6.200.0080.01915.10
5.6.190.0070.02215.14
5.6.180.0090.01815.14
5.6.170.0100.02315.19
5.6.160.0100.01815.18
5.6.150.0080.02014.98
5.6.140.0080.02515.08
5.6.130.0070.01914.98
5.6.120.0080.01714.97
5.6.110.0070.02315.00
5.6.100.0090.02415.00
5.6.90.0090.02414.93
5.6.80.0070.02614.84
5.6.70.0120.01814.79
5.6.60.0080.02114.95
5.6.50.0110.02114.79
5.6.40.0080.02414.75
5.6.30.0080.01614.91
5.6.20.0050.01514.78
5.6.10.0070.01314.74
5.6.00.0080.01214.75
5.5.380.0100.00213.11
5.5.370.0080.01614.92
5.5.360.0100.01314.77
5.5.350.0100.02214.79
5.5.340.0110.02114.92
5.5.330.0090.02214.84
5.5.320.0110.02214.88
5.5.310.0120.02114.94
5.5.300.0110.01314.93
5.5.290.0110.02614.96
5.5.280.0090.02214.90
5.5.270.0070.02914.93
5.5.260.0130.01414.86
5.5.250.0090.01714.80
5.5.240.0130.01514.86
5.5.230.0070.02514.82
5.5.220.0120.01314.81
5.5.210.0060.01914.84
5.5.200.0080.02114.60
5.5.190.0110.01514.76
5.5.180.0080.02514.70
5.5.170.0060.00512.88
5.5.160.0090.01114.70
5.5.150.0060.01414.56
5.5.140.0080.01214.66
5.5.130.0100.01914.57
5.5.120.0070.01414.64
5.5.110.0070.02314.63
5.5.100.0080.01314.73
5.5.90.0080.01314.78
5.5.80.0090.01314.65
5.5.70.0090.01214.71
5.5.60.0050.01514.75
5.5.50.0070.01214.75
5.5.40.0080.01214.71
5.5.30.0060.01414.68
5.5.20.0070.01214.65
5.5.10.0090.01114.65
5.5.00.0080.01014.65
5.4.450.0120.02114.44
5.4.440.0090.02114.46
5.4.430.0070.02514.55
5.4.420.0080.02214.57
5.4.410.0100.02014.43
5.4.400.0080.01414.34
5.4.390.0110.02014.34
5.4.380.0100.02014.28
5.4.370.0090.02014.37
5.4.360.0060.02314.30
5.4.350.0090.02014.45
5.4.340.0100.01114.40
5.4.330.0080.00312.69
5.4.320.0060.02114.43
5.4.310.0110.01014.47
5.4.300.0070.01314.44
5.4.290.0070.01314.46
5.4.280.0080.01414.30
5.4.270.0120.01714.40
5.4.260.0070.01314.34
5.4.250.0070.01314.36
5.4.240.0080.01214.38
5.4.230.0080.01314.10
5.4.220.0070.01314.21
5.4.210.0080.01114.18
5.4.200.0070.01314.13
5.4.190.0060.01314.21
5.4.180.0080.01714.19
5.4.170.0080.01414.24
5.4.160.0070.01414.23
5.4.150.0100.01214.28
5.4.140.0060.01313.78
5.4.130.0060.01313.74
5.4.120.0070.01213.77
5.4.110.0070.01413.85
5.4.100.0080.02113.81
5.4.90.0080.02013.76
5.4.80.0080.01113.80
5.4.70.0090.01813.82
5.4.60.0070.02113.82
5.4.50.0050.01613.60
5.4.40.0080.01313.81
5.4.30.0060.02413.78
5.4.20.0070.02113.82
5.4.10.0120.01313.77
5.4.00.0110.01913.44
5.3.290.0080.01213.81
5.3.280.0050.01413.62
5.3.270.0080.01113.66
5.3.260.0070.01013.76
5.3.250.0090.01013.80
5.3.240.0070.01213.60
5.3.230.0060.01413.65
5.3.220.0050.01513.45
5.3.210.0070.01313.48
5.3.200.0060.01313.54
5.3.190.0100.02013.48
5.3.180.0090.01813.71
5.3.170.0080.02113.72
5.3.160.0060.02213.66
5.3.150.0080.02313.60
5.3.140.0090.01313.55
5.3.130.0110.02113.68
5.3.120.0080.01713.66
5.3.110.0060.01813.57
5.3.100.0080.02213.54
5.3.90.0100.01513.44
5.3.80.0080.02313.43
5.3.70.0110.01713.38
5.3.60.0060.02313.38
5.3.50.0070.01413.47
5.3.40.0100.01213.42
5.3.30.0080.01113.41
5.3.20.0060.02713.24
5.3.10.0070.02013.21
5.3.00.0090.01613.11

preferences:
50.41 ms | 401 KiB | 5 Q