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

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.40.0040.01118.79
8.3.30.0070.00719.09
8.3.20.0040.00420.38
8.3.10.0040.00423.48
8.3.00.0040.00419.38
8.2.170.0070.00722.96
8.2.160.0120.00319.02
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00422.25
8.2.110.0100.00020.98
8.2.100.0080.00417.91
8.2.90.0030.00519.23
8.2.80.0040.00418.03
8.2.70.0080.00017.50
8.2.60.0050.00318.05
8.2.50.0030.00618.07
8.2.40.0030.00618.16
8.2.30.0030.00518.06
8.2.20.0050.00217.75
8.2.10.0000.00818.17
8.2.00.0050.00517.65
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0150.00428.09
8.1.240.0030.01019.05
8.1.230.0040.00719.02
8.1.220.0100.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0050.00317.41
8.1.180.0030.00618.10
8.1.170.0060.00318.59
8.1.160.0000.00721.98
8.1.150.0040.00418.65
8.1.140.0040.00417.56
8.1.130.0000.00717.99
8.1.120.0050.00217.41
8.1.110.0050.00317.50
8.1.100.0050.00217.54
8.1.90.0000.00717.54
8.1.80.0090.00017.57
8.1.70.0000.00817.46
8.1.60.0030.00517.63
8.1.50.0000.00817.57
8.1.40.0040.00417.57
8.1.30.0080.00017.63
8.1.20.0030.00617.59
8.1.10.0000.00817.65
8.1.00.0040.00417.56
8.0.300.0000.00818.77
8.0.290.0030.00617.18
8.0.280.0070.00018.55
8.0.270.0030.00317.18
8.0.260.0060.00017.37
8.0.250.0040.00416.96
8.0.240.0040.00416.98
8.0.230.0030.00317.07
8.0.220.0070.00017.04
8.0.210.0070.00317.02
8.0.200.0000.00617.11
8.0.190.0030.00517.04
8.0.180.0040.00417.04
8.0.170.0050.00317.07
8.0.160.0000.00716.96
8.0.150.0040.00416.91
8.0.140.0000.00716.98
8.0.130.0030.00313.50
8.0.120.0080.00413.62
8.0.110.0070.00513.61
8.0.100.0040.00913.57
8.0.90.0060.00813.59
8.0.80.0090.00513.65
8.0.70.0140.00113.55
8.0.60.0060.01013.56
8.0.50.0120.00413.60
8.0.30.0130.00213.56
8.0.20.0050.01013.62
8.0.10.0110.00513.68
8.0.00.0080.00213.70
7.4.330.0060.00015.00
7.4.320.0060.00016.66
7.4.300.0030.00316.56
7.4.290.0000.00716.66
7.4.280.0030.00616.66
7.4.270.0040.00416.51
7.4.260.0000.00816.52
7.4.250.0130.00413.44
7.4.240.0140.00413.40
7.4.230.0090.01013.46
7.4.220.0080.00713.52
7.4.210.0110.00413.41
7.4.200.0110.00413.46
7.4.190.0130.00313.47
7.4.180.0100.00613.49
7.4.160.0080.00913.56
7.4.150.0120.00313.51
7.4.140.0160.00113.46
7.4.130.0100.00613.44
7.4.120.0110.00613.47
7.4.110.0160.00013.37
7.4.100.0110.00413.50
7.4.90.0080.00613.47
7.4.80.0070.01215.27
7.4.70.0080.01014.60
7.4.60.0070.01014.59
7.4.50.0090.00614.52
7.4.40.0110.00515.79
7.4.30.0100.00714.65
7.4.20.0080.01014.13
7.4.10.0120.00614.04
7.4.00.0100.00614.37
7.3.330.0030.00313.27
7.3.320.0070.00413.44
7.3.310.0130.00313.54
7.3.300.0090.00513.49
7.3.290.0090.00613.51
7.3.280.0140.00113.47
7.3.270.0070.00813.55
7.3.260.0060.01013.57
7.3.250.0070.00713.58
7.3.240.0060.01013.57
7.3.230.0120.00313.43
7.3.220.0150.00013.41
7.3.210.0100.00613.47
7.3.200.0080.01015.12
7.3.190.0100.00714.66
7.3.180.0070.01114.58
7.3.170.0120.00514.56
7.3.160.0110.00514.67
7.3.150.0160.00114.16
7.3.140.0110.00614.20
7.3.130.0120.00514.18
7.3.120.0100.00614.29
7.3.110.0130.00314.11
7.3.100.0130.00214.17
7.3.90.0120.00914.37
7.3.80.0120.00614.29
7.3.70.0110.00414.26
7.3.60.0130.00514.28
7.3.50.0080.00914.24
7.3.40.0090.00714.30
7.3.30.0110.00614.34
7.3.20.0130.00615.47
7.3.10.0110.00515.45
7.3.00.0080.00715.40
7.2.340.0090.00613.55
7.2.330.0110.00613.65
7.2.320.0120.00814.33
7.2.310.0120.00714.77
7.2.300.0100.01014.83
7.2.290.0140.00514.88
7.2.280.0150.00614.30
7.2.270.0180.00314.29
7.2.260.0100.00714.31
7.2.250.0130.00414.26
7.2.240.0120.00614.33
7.2.230.0150.00514.31
7.2.220.0170.00714.47
7.2.210.0170.00714.36
7.2.200.0200.00414.49
7.2.190.0210.00414.33
7.2.180.0160.00514.42
7.2.170.0130.00714.44
7.2.160.0150.00614.44
7.2.150.0160.00215.61
7.2.140.0140.00715.57
7.2.130.0100.00715.78
7.2.120.0140.00415.69
7.2.110.0150.00515.68
7.2.100.0130.00615.77
7.2.90.0120.00515.65
7.2.80.0130.00715.58
7.2.70.0090.01015.66
7.2.60.0120.00715.95
7.2.50.0130.00615.67
7.2.40.0190.00315.70
7.2.30.0120.00715.68
7.2.20.0150.00715.74
7.2.10.0100.00915.71
7.2.00.0130.00916.37
7.1.330.0070.01014.60
7.1.320.0130.00714.62
7.1.310.0090.00814.67
7.1.300.0120.00514.66
7.1.290.0090.00814.69
7.1.280.0110.00714.63
7.1.270.0110.00714.58
7.1.260.0040.01314.67
7.1.250.0110.00614.65
7.1.240.0170.00314.65
7.1.230.0100.00714.63
7.1.220.0090.00714.65
7.1.210.0110.00514.75
7.1.200.0100.00714.77
7.1.190.0130.00514.72
7.1.180.0110.00614.64
7.1.170.0130.00414.63
7.1.160.0100.00614.76
7.1.150.0120.00414.62
7.1.140.0120.00514.64
7.1.130.0140.00514.65
7.1.120.0130.00414.67
7.1.110.0140.00714.67
7.1.100.0120.00815.58
7.1.90.0110.00614.69
7.1.80.0120.00514.66
7.1.70.0120.00715.22
7.1.60.0120.00715.88
7.1.50.0120.01019.79
7.1.40.0080.00614.81
7.1.30.0120.00614.71
7.1.20.0120.00814.70
7.1.10.0130.00414.69
7.1.00.0170.02116.64
7.0.330.0080.00714.54
7.0.320.0130.00214.58
7.0.310.0100.00414.62
7.0.300.0110.00614.55
7.0.290.0130.00414.43
7.0.280.0060.00914.48
7.0.270.0120.00614.50
7.0.260.0230.00514.49
7.0.250.0130.00714.70
7.0.240.0120.00614.62
7.0.230.0070.00914.54
7.0.220.0120.00314.56
7.0.210.0070.00614.60
7.0.200.0120.00615.12
7.0.190.0070.00714.51
7.0.180.0090.00614.55
7.0.170.0070.00714.61
7.0.160.0110.00614.52
7.0.150.0130.00414.59
7.0.140.0150.02316.52
7.0.130.0170.00214.64
7.0.120.0090.00714.57
7.0.110.0170.00614.57
7.0.100.0120.00414.50
7.0.90.0150.02815.88
7.0.80.0170.02415.88
7.0.70.0140.02815.87
7.0.60.0170.02515.90
7.0.50.0140.02315.91
7.0.40.0120.01615.88
7.0.30.0150.01615.94
7.0.20.0120.02515.93
7.0.10.0110.01715.85
7.0.00.0140.01515.83
5.6.400.0120.00413.81
5.6.390.0150.00513.93
5.6.380.0070.00814.11
5.6.370.0090.00513.91
5.6.360.0080.00913.94
5.6.350.0080.00813.68
5.6.340.0130.00313.73
5.6.330.0120.00713.84
5.6.320.0110.00714.02
5.6.310.0070.01113.82
5.6.300.0120.00613.79
5.6.290.0110.00713.87
5.6.280.0130.00613.88
5.6.270.0120.00613.84
5.6.260.0120.00713.90
5.6.250.0070.00913.76
5.6.240.0170.01715.66
5.6.230.0140.01515.77
5.6.220.0160.01815.68
5.6.210.0150.02415.67
5.6.200.0150.02515.74
5.6.190.0150.02515.78
5.6.180.0130.02015.80
5.6.170.0150.01915.79
5.6.160.0170.01415.82
5.6.150.0150.02315.82
5.6.140.0210.02015.75
5.6.130.0150.01815.67
5.6.120.0170.02115.79
5.6.110.0200.02415.80
5.6.100.0210.02315.71
5.6.90.0200.02715.67
5.6.80.0140.02715.51
5.6.70.0190.02315.68
5.6.60.0210.02115.71
5.6.50.0100.02115.64
5.6.40.0130.01115.62
5.6.30.0140.02315.59
5.6.20.0140.02315.65
5.6.10.0200.02115.57
5.6.00.0160.01415.49
5.5.380.0150.02315.59
5.5.370.0140.02715.63
5.5.360.0140.02315.52
5.5.350.0120.02115.47
5.5.340.0120.01715.59
5.5.330.0130.02315.71
5.5.320.0110.02115.54
5.5.310.0110.01615.58
5.5.300.0160.02115.67
5.5.290.0160.01315.57
5.5.280.0140.02015.63
5.5.270.0110.02015.64
5.5.260.0140.02815.58
5.5.250.0230.02815.60
5.5.240.0150.02415.54
5.5.230.0190.02415.54
5.5.220.0210.01915.58
5.5.210.0130.02715.59
5.5.200.0130.02715.53
5.5.190.0160.02315.41
5.5.180.0150.02015.51
5.5.170.0100.00613.77
5.5.160.0190.01515.41
5.5.150.0140.01415.44
5.5.140.0150.02915.33
5.5.130.0170.01615.52
5.5.120.0180.01315.42
5.5.110.0160.02415.46
5.5.100.0130.02415.39
5.5.90.0160.01815.52
5.5.80.0110.01915.52
5.5.70.0150.02315.57
5.5.60.0180.02215.49
5.5.50.0150.02115.48
5.5.40.0130.02215.45
5.5.30.0120.02615.50
5.5.20.0180.02415.51
5.5.10.0170.02115.46
5.5.00.0160.01315.48
5.4.450.0350.02714.74
5.4.440.0330.03314.58
5.4.430.0250.02214.65
5.4.420.0440.03114.67
5.4.410.0250.03414.62
5.4.400.0360.03214.48
5.4.390.0300.03214.50
5.4.380.0280.02414.40
5.4.370.0280.03114.63
5.4.360.0260.03414.34
5.4.350.0390.03114.50
5.4.340.0220.03114.65
5.4.330.0370.02012.98
5.4.320.0300.02414.46
5.4.310.0290.02614.48
5.4.300.0220.03014.56
5.4.290.0290.03114.55
5.4.280.0340.02914.62
5.4.270.0250.02814.52
5.4.260.0280.03314.53
5.4.250.0280.03114.40
5.4.240.0300.02814.46
5.4.230.0320.03214.47
5.4.220.0310.02814.35
5.4.210.0360.03514.33
5.4.200.0260.03114.35
5.4.190.0210.03314.34
5.4.180.0200.02314.43
5.4.170.0280.03514.53
5.4.160.0250.03214.41
5.4.150.0280.02214.53
5.4.140.0230.02213.92
5.4.130.0180.02813.92
5.4.120.0290.03813.93
5.4.110.0370.02913.99
5.4.100.0320.03413.92
5.4.90.0390.03813.98
5.4.80.0330.02913.93
5.4.70.0320.03213.94
5.4.60.0370.04213.98
5.4.50.0260.02613.83
5.4.40.0220.02713.91
5.4.30.0300.03013.94
5.4.20.0330.02813.95
5.4.10.0300.03113.89
5.4.00.0300.03213.63
5.3.290.0340.03413.78
5.3.280.0270.03313.60
5.3.270.0230.03013.75
5.3.260.0340.03613.77
5.3.250.0300.03213.90
5.3.240.0360.03313.80
5.3.230.0300.03813.66
5.3.220.0230.03413.59
5.3.210.0310.02813.64
5.3.200.0350.02913.54
5.3.190.0210.03113.61
5.3.180.0220.02613.72
5.3.170.0210.02413.73
5.3.160.0290.03413.83
5.3.150.0400.03213.82
5.3.140.0310.03313.67
5.3.130.0250.02913.63
5.3.120.0320.02513.63
5.3.110.0350.03513.68
5.3.100.0280.03713.45
5.3.90.0300.02713.48
5.3.80.0280.03513.44
5.3.70.0270.03013.56
5.3.60.0280.03813.45
5.3.50.0250.03413.42
5.3.40.0220.03213.52
5.3.30.0270.02113.47
5.3.20.0270.02813.24
5.3.10.0270.02813.38
5.3.00.0330.02513.18

preferences:
52.07 ms | 400 KiB | 5 Q