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

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.63
8.3.50.0120.00621.96
8.3.40.0160.00718.97
8.3.30.0030.01219.14
8.3.20.0040.00420.16
8.3.10.0080.00023.66
8.3.00.0040.00419.25
8.2.180.0040.01116.36
8.2.170.0070.01122.96
8.2.160.0090.00920.35
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.50
8.2.110.0040.00422.08
8.2.100.0060.00617.91
8.2.90.0060.00319.21
8.2.80.0050.00317.97
8.2.70.0030.00517.50
8.2.60.0000.00818.04
8.2.50.0080.00018.07
8.2.40.0030.00618.16
8.2.30.0040.00418.11
8.2.20.0020.00517.62
8.2.10.0000.00717.97
8.2.00.0060.00617.64
8.1.280.0130.00325.92
8.1.270.0050.00322.19
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0060.00323.91
8.1.230.0030.00918.97
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.10
8.1.190.0080.00017.29
8.1.180.0080.00018.10
8.1.170.0080.00018.74
8.1.160.0000.00722.00
8.1.150.0000.00918.68
8.1.140.0070.00017.36
8.1.130.0030.00317.77
8.1.120.0000.00717.45
8.1.110.0040.00417.41
8.1.100.0000.00717.49
8.1.90.0050.00217.34
8.1.80.0050.00217.45
8.1.70.0070.00017.40
8.1.60.0040.00417.46
8.1.50.0040.00417.55
8.1.40.0080.00017.39
8.1.30.0050.00317.51
8.1.20.0030.00517.53
8.1.10.0090.00017.53
8.1.00.0000.00817.36
8.0.300.0000.00818.77
8.0.290.0040.00417.30
8.0.280.0030.00318.43
8.0.270.0070.00017.12
8.0.260.0040.00416.90
8.0.250.0030.00317.03
8.0.240.0030.00517.05
8.0.230.0080.00017.01
8.0.220.0000.00717.01
8.0.210.0000.00716.80
8.0.200.0050.00316.94
8.0.190.0060.00317.05
8.0.180.0020.00516.98
8.0.170.0040.00416.86
8.0.160.0040.00416.93
8.0.150.0000.00716.86
8.0.140.0070.00016.86
8.0.130.0030.00313.41
8.0.120.0030.00514.28
8.0.110.0050.00414.28
8.0.100.0050.00514.29
8.0.90.0070.00314.27
8.0.80.0090.00514.33
8.0.70.0070.00514.32
8.0.60.0060.00514.31
8.0.50.0070.00414.27
8.0.30.0070.00714.85
8.0.20.0070.00815.00
8.0.10.0070.00414.38
8.0.00.0070.00414.82
7.4.330.0030.00315.16
7.4.320.0030.00316.35
7.4.300.0000.00716.64
7.4.290.0030.00316.59
7.4.280.0000.00716.47
7.4.270.0000.00716.51
7.4.260.0100.00016.61
7.4.250.0080.00514.11
7.4.240.0080.00314.55
7.4.230.0090.00314.10
7.4.220.0120.00114.14
7.4.210.0070.00714.94
7.4.200.0060.00514.18
7.4.190.0050.00614.15
7.4.180.0080.00513.37
7.4.160.0110.00314.19
7.4.150.0090.00414.32
7.4.140.0110.00415.16
7.4.130.0080.00614.63
7.4.120.0090.00714.63
7.4.110.0080.00714.04
7.4.100.0100.00414.15
7.4.90.0090.00514.07
7.4.80.0090.00515.18
7.4.70.0080.00814.51
7.4.60.0080.00714.48
7.4.50.0090.00514.40
7.4.40.0090.00515.76
7.4.30.0090.00614.54
7.4.20.0100.00414.03
7.4.10.0120.00313.97
7.4.00.0090.00614.23
7.3.330.0000.00513.34
7.3.320.0130.00013.35
7.3.310.0020.00914.16
7.3.300.0080.00314.19
7.3.290.0070.00714.09
7.3.280.0100.00414.87
7.3.270.0110.00414.37
7.3.260.0100.00314.25
7.3.250.0110.00414.58
7.3.240.0090.00614.16
7.3.230.0090.00514.17
7.3.220.0080.00413.29
7.3.210.0100.00414.05
7.3.200.0080.01015.11
7.3.190.0090.00914.46
7.3.180.0070.00714.58
7.3.170.0080.00514.48
7.3.160.0090.00514.63
7.3.150.0090.00613.97
7.3.140.0090.00614.03
7.3.130.0090.00514.04
7.3.120.0080.00714.31
7.3.110.0090.00514.14
7.3.100.0050.00714.05
7.3.90.0070.00514.34
7.3.80.0080.00514.16
7.3.70.0050.00514.18
7.3.60.0040.00814.21
7.3.50.0050.00514.21
7.3.40.0080.00514.27
7.3.30.0060.00814.31
7.3.20.0040.00815.73
7.3.10.0060.00715.89
7.3.00.0080.00515.98
7.2.340.0120.00113.53
7.2.330.0090.00614.38
7.2.320.0090.00514.24
7.2.310.0110.00414.83
7.2.300.0110.00514.68
7.2.290.0080.00714.80
7.2.280.0100.00414.25
7.2.270.0130.00414.37
7.2.260.0090.00514.20
7.2.250.0110.00614.45
7.2.240.0120.00514.37
7.2.230.0110.00514.57
7.2.220.0070.00814.47
7.2.210.0070.00914.55
7.2.200.0110.00614.45
7.2.190.0080.00514.35
7.2.180.0090.00414.50
7.2.170.0120.00514.52
7.2.160.0100.00514.29
7.2.150.0090.00815.65
7.2.140.0140.00415.64
7.2.130.0110.00416.13
7.2.120.0080.00616.10
7.2.110.0070.00716.13
7.2.100.0110.00316.09
7.2.90.0080.00716.08
7.2.80.0100.00616.07
7.2.70.0110.00716.01
7.2.60.0110.00616.02
7.2.50.0100.00615.95
7.2.40.0100.00615.99
7.2.30.0070.00816.12
7.2.20.0110.00616.09
7.2.10.0090.00616.02
7.2.00.0100.00316.56
7.1.330.0140.00514.90
7.1.320.0110.00314.87
7.1.310.0060.00914.92
7.1.300.0100.00714.85
7.1.290.0090.00614.93
7.1.280.0100.00814.92
7.1.270.0100.00714.81
7.1.260.0080.00814.93
7.1.250.0110.00615.03
7.1.240.0120.00314.56
7.1.230.0100.00514.58
7.1.220.0130.00214.70
7.1.210.0120.00214.69
7.1.200.0090.00814.61
7.1.190.0100.00614.61
7.1.180.0160.00314.60
7.1.170.0130.00514.67
7.1.160.0100.00514.60
7.1.150.0120.00714.63
7.1.140.0130.00414.66
7.1.130.0480.00314.56
7.1.120.0070.00814.62
7.1.110.0110.00314.61
7.1.100.0120.00515.28
7.1.90.0120.00414.67
7.1.80.0120.00414.69
7.1.70.0100.00415.21
7.1.60.0100.00515.16
7.1.50.0130.00515.05
7.1.40.0170.00214.64
7.1.30.0130.00714.70
7.1.20.0130.00614.70
7.1.10.0170.00514.53
7.1.00.0100.01916.18
7.0.330.0120.00414.52
7.0.320.0170.00214.47
7.0.310.0130.00414.47
7.0.300.0100.00714.38
7.0.290.0100.00614.37
7.0.280.0120.00514.36
7.0.270.0150.00314.45
7.0.260.0110.00414.51
7.0.250.0090.00614.53
7.0.240.0100.00514.62
7.0.230.0090.00814.66
7.0.220.0130.00314.58
7.0.210.0130.00414.65
7.0.200.0180.00415.06
7.0.190.0110.00514.62
7.0.180.0110.00714.63
7.0.170.0090.00714.59
7.0.160.0130.00314.51
7.0.150.0140.00514.62
7.0.140.0120.01716.04
7.0.130.0140.00414.60
7.0.120.0140.00514.60
7.0.110.0130.00514.53
7.0.100.0150.00614.59
7.0.90.0140.00614.47
7.0.80.0310.01915.54
7.0.70.0200.01415.61
7.0.60.0230.00915.57
7.0.50.0230.01815.59
7.0.40.0140.01115.70
7.0.30.0110.02315.64
7.0.20.0130.02215.63
7.0.10.0090.01615.67
7.0.00.0160.01315.57
5.6.400.0090.00813.68
5.6.390.0150.00313.73
5.6.380.0120.00513.52
5.6.370.0120.00513.63
5.6.360.0130.00613.84
5.6.350.0090.00613.66
5.6.340.0140.00413.53
5.6.330.0120.00413.68
5.6.320.0100.00413.67
5.6.310.0150.00213.64
5.6.300.0120.00813.46
5.6.290.0100.00713.67
5.6.280.0120.01815.21
5.6.270.0140.00413.62
5.6.260.0140.00713.79
5.6.250.0160.00613.64
5.6.240.0110.00713.81
5.6.230.0120.02315.19
5.6.220.0130.02115.09
5.6.210.0150.01815.13
5.6.200.0130.02015.23
5.6.190.0130.02115.27
5.6.180.0090.01915.20
5.6.170.0150.01715.20
5.6.160.0110.02115.28
5.6.150.0130.01515.19
5.6.140.0080.02315.29
5.6.130.0130.01215.17
5.6.120.0120.01215.16
5.6.110.0090.01515.23
5.6.100.0110.02215.14
5.6.90.0130.01815.16
5.6.80.0120.01714.95
5.6.70.0120.02115.10
5.6.60.0130.02015.09
5.6.50.0110.01614.89
5.6.40.0140.01815.06
5.6.30.0110.01815.04
5.6.20.0080.01914.99
5.6.10.0130.01914.96
5.6.00.0120.01815.00
5.5.380.0120.00713.85
5.5.370.0120.01215.14
5.5.360.0150.02115.11
5.5.350.0090.01814.97
5.5.340.0110.02215.11
5.5.330.0110.02115.07
5.5.320.0140.02315.05
5.5.310.0160.01815.09
5.5.300.0090.02215.07
5.5.290.0110.01215.05
5.5.280.0130.01615.09
5.5.270.0120.01315.13
5.5.260.0070.01815.10
5.5.250.0130.01915.14
5.5.240.0110.02114.94
5.5.230.0100.02114.93
5.5.220.0100.01414.98
5.5.210.0090.01615.13
5.5.200.0120.01314.88
5.5.190.0140.02214.97
5.5.180.0140.01814.98
5.5.170.0150.00713.63
5.5.160.0130.01814.94
5.5.150.0110.02214.93
5.5.140.0120.01914.82
5.5.130.0110.02114.91
5.5.120.0120.01514.83
5.5.110.0090.02214.89
5.5.100.0100.01614.96
5.5.90.0140.01715.05
5.5.80.0070.01814.94
5.5.70.0140.01014.98
5.5.60.0100.02014.93
5.5.50.0110.01214.95
5.5.40.0110.01214.94
5.5.30.0140.01114.92
5.5.20.0120.02114.98
5.5.10.0120.01314.93
5.5.00.0110.02014.85
5.4.450.0120.01814.13
5.4.440.0090.01414.17
5.4.430.0120.02014.14
5.4.420.0080.02114.21
5.4.410.0090.01714.19
5.4.400.0130.01614.04
5.4.390.0110.01713.99
5.4.380.0110.02114.02
5.4.370.0100.01514.05
5.4.360.0110.01213.99
5.4.350.0100.01414.10
5.4.340.0120.01914.18
5.4.330.0120.00512.82
5.4.320.0100.02014.04
5.4.310.0100.02014.11
5.4.300.0060.02314.04
5.4.290.0130.01914.15
5.4.280.0130.01814.23
5.4.270.0120.01614.14
5.4.260.0160.01714.11
5.4.250.0140.01714.03
5.4.240.0130.01714.04
5.4.230.0100.01613.92
5.4.220.0110.02113.92
5.4.210.0120.02013.92
5.4.200.0120.01113.88
5.4.190.0110.01913.88
5.4.180.0140.01613.91
5.4.170.0110.01513.96
5.4.160.0100.02013.98
5.4.150.0070.02313.99
5.4.140.0130.01813.52
5.4.130.0140.01213.56
5.4.120.0100.02013.65
5.4.110.0110.01913.60
5.4.100.0090.02213.66
5.4.90.0100.01513.65
5.4.80.0120.01313.61
5.4.70.0120.01813.68
5.4.60.0100.01413.56
5.4.50.0080.01413.56
5.4.40.0120.01513.67
5.4.30.0100.01913.62
5.4.20.0100.01913.77
5.4.10.0110.02013.57
5.4.00.0090.01913.33
5.3.290.0100.01913.75
5.3.280.0100.02013.49
5.3.270.0110.01213.58
5.3.260.0090.02113.63
5.3.250.0100.02013.57
5.3.240.0100.01913.58
5.3.230.0110.01213.53
5.3.220.0100.02013.39
5.3.210.0080.02113.44
5.3.200.0060.01913.53
5.3.190.0140.01313.45
5.3.180.0070.01513.61
5.3.170.0080.02213.64
5.3.160.0110.01813.67
5.3.150.0110.02213.63
5.3.140.0120.01413.58
5.3.130.0100.01513.59
5.3.120.0120.01213.55
5.3.110.0120.02113.49
5.3.100.0130.01813.43
5.3.90.0080.02113.40
5.3.80.0080.02113.30
5.3.70.0120.01513.27
5.3.60.0080.01713.34
5.3.50.0100.02113.39
5.3.40.0110.02013.40
5.3.30.0100.02013.34
5.3.20.0080.02113.28
5.3.10.0080.02013.12
5.3.00.0100.02013.12
5.2.170.0100.01311.96
5.2.160.0070.01811.98
5.2.150.0110.01612.05
5.2.140.0060.02012.02
5.2.130.0080.01611.92
5.2.120.0070.01311.86
5.2.110.0090.01011.81
5.2.100.0100.01411.92
5.2.90.0070.01811.81
5.2.80.0080.01811.80
5.2.70.0090.01611.86
5.2.60.0070.01311.84
5.2.50.0090.01811.79
5.2.40.0110.01511.88
5.2.30.0070.01811.84
5.2.20.0060.01911.75
5.2.10.0090.01211.56
5.2.00.0080.01511.54
5.1.60.0080.01310.97
5.1.50.0060.01511.03
5.1.40.0050.01511.07
5.1.30.0070.01311.27
5.1.20.0100.01211.28
5.1.10.0070.01711.13
5.1.00.0050.01811.08
5.0.50.0080.00910.38
5.0.40.0080.01110.35
5.0.30.0070.01610.28
5.0.20.0040.01310.31
5.0.10.0050.01110.30
5.0.00.0060.01210.30
4.4.90.0050.00710.26
4.4.80.0060.01010.26
4.4.70.0050.00810.26
4.4.60.0040.00810.26
4.4.50.0020.01110.26
4.4.40.0060.01210.26
4.4.30.0070.00710.26
4.4.20.0050.00910.26
4.4.10.0010.01210.26
4.4.00.0040.01110.26
4.3.110.0070.00510.26
4.3.100.0050.00710.26
4.3.90.0040.01010.26
4.3.80.0040.00910.26
4.3.70.0030.00610.26
4.3.60.0030.01010.26
4.3.50.0030.01110.26
4.3.40.0070.00910.26
4.3.30.0040.00610.26
4.3.20.0050.00710.26
4.3.10.0020.00810.26
4.3.00.0010.00710.26

preferences:
53.93 ms | 401 KiB | 5 Q