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('/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.40.0100.01018.79
8.3.30.0090.00919.25
8.3.20.0070.00020.34
8.3.10.0040.00424.66
8.3.00.0130.00624.66
8.2.170.0090.00622.96
8.2.160.0070.00720.57
8.2.150.0080.00024.18
8.2.140.0070.00324.66
8.2.130.0080.00024.66
8.1.270.0090.00024.66
8.1.260.0070.00024.66
8.0.120.0200.00618.12
8.0.110.0120.01418.09
8.0.100.0130.01518.07
8.0.90.0160.01118.12
8.0.80.0170.01318.02
8.0.70.0130.01318.09
8.0.60.0180.00818.00
8.0.50.0130.01318.09
8.0.30.0160.01217.86
8.0.20.0140.01218.07
8.0.10.0150.01118.15
8.0.00.0120.01117.94
7.4.250.0120.01517.95
7.4.240.0090.01317.61
7.4.230.0150.01217.92
7.4.220.0180.01117.88
7.4.210.0130.01117.48
7.4.200.0150.01117.94
7.4.190.0100.01617.92
7.4.180.0170.01618.37
7.4.160.0150.01317.96
7.4.150.0140.01418.06
7.4.140.0140.01218.13
7.4.130.0160.01117.65
7.4.120.0150.01117.67
7.4.110.0190.01017.87
7.4.100.0180.01017.95
7.4.90.0150.01317.81
7.4.80.0140.01418.00
7.4.70.0160.01117.51
7.4.60.0180.01117.51
7.4.50.0120.01217.40
7.4.40.0120.01418.68
7.4.30.0170.01217.56
7.4.20.0170.01117.73
7.4.10.0130.01517.74
7.4.00.0130.01317.23
7.3.320.0260.01520.60
7.3.310.0100.01617.93
7.3.300.0180.00817.91
7.3.290.0160.01218.00
7.3.280.0140.01117.50
7.3.270.0190.01018.16
7.3.260.0160.01117.95
7.3.250.0130.01217.68
7.3.240.0180.01017.81
7.3.230.0120.01717.87
7.3.220.0140.01618.29
7.3.210.0140.01317.81
7.3.200.0150.01418.13
7.3.190.0110.01317.50
7.3.180.0190.00717.55
7.3.170.0130.01117.51
7.3.160.0130.01217.50
7.3.150.0130.01417.76
7.3.140.0130.01517.73
7.3.130.0180.01117.86
7.3.120.0120.01317.21
7.3.110.0120.01617.77
7.3.100.0170.01017.75
7.3.90.0230.00717.95
7.3.80.0130.01417.84
7.3.70.0140.01617.75
7.3.60.0140.01417.87
7.3.50.0160.01017.90
7.3.40.0140.01317.87
7.3.30.0100.01717.78
7.3.20.0170.01018.46
7.3.10.0190.01018.42
7.3.00.0140.01418.49
7.2.340.0260.01118.61
7.2.330.0200.01018.09
7.2.320.0230.01018.09
7.2.310.0150.01317.80
7.2.300.0180.01317.76
7.2.290.0160.01217.76
7.2.280.0150.01618.09
7.2.270.0210.01018.05
7.2.260.0190.01318.14
7.2.250.0180.01518.17
7.2.240.0170.01318.01
7.2.230.0190.01218.13
7.2.220.0210.01218.03
7.2.210.0110.02018.03
7.2.200.0250.00718.20
7.2.190.0170.01418.12
7.2.180.0150.01818.08
7.2.170.0180.01318.12
7.2.160.0160.01318.14
7.2.150.0170.01418.76
7.2.140.0180.01118.72
7.2.130.0210.01318.96
7.2.120.0180.01318.75
7.2.110.0210.00918.89
7.2.100.0170.01418.87
7.2.90.0290.01018.72
7.2.80.0220.01218.84
7.2.70.0170.01318.85
7.2.60.0140.01418.41
7.2.50.0180.01418.76
7.2.40.0280.01218.78
7.2.30.0160.01318.87
7.2.20.0230.01018.76
7.2.10.0170.01518.80
7.2.00.0160.01118.87
7.1.330.0160.01317.76
7.1.320.0140.01517.73
7.1.310.0130.01617.82
7.1.300.0150.01517.74
7.1.290.0160.01617.81
7.1.280.0150.01617.80
7.1.270.0240.00917.76
7.1.260.0190.01317.77
7.1.250.0150.01517.73
7.1.240.0170.01317.76
7.1.230.0180.01317.79
7.1.220.0160.01617.78
7.1.210.0200.01417.73
7.1.200.0120.01417.39
7.1.190.0210.01117.76
7.1.180.0150.01717.79
7.1.170.0190.01517.67
7.1.160.0160.01417.74
7.1.150.0140.01817.70
7.1.140.0190.01517.61
7.1.130.0160.01517.65
7.1.120.0180.01217.67
7.1.110.0210.01017.75
7.1.100.0220.00917.77
7.1.90.0180.01417.72
7.1.80.0170.01517.76
7.1.70.0150.01217.52
7.1.60.0160.01718.18
7.1.50.0170.01317.61
7.1.40.0170.01617.68
7.1.30.0180.01417.77
7.1.20.0200.01117.76
7.1.10.0150.01617.75
7.1.00.0180.02518.65
7.0.330.0250.01216.67
7.0.320.0180.01616.52
7.0.310.0200.01416.58
7.0.300.0190.01516.69
7.0.290.0190.01516.64
7.0.280.0150.01516.62
7.0.270.0140.02016.58
7.0.260.0290.01116.54
7.0.250.0200.01516.62
7.0.240.0230.01016.81
7.0.230.0230.01516.81
7.0.220.0310.00616.79
7.0.210.0210.01516.63
7.0.200.0170.01316.76
7.0.190.0230.01116.75
7.0.180.0250.01616.71
7.0.170.0170.01816.73
7.0.160.0210.01316.68
7.0.150.0230.01216.63
7.0.140.0120.02616.40
7.0.130.0100.01114.94
7.0.120.0120.01014.78
7.0.110.0130.00814.82
7.0.100.0160.00614.80
7.0.90.0100.03017.87
7.0.80.0060.02617.63
7.0.70.0430.04017.65
7.0.60.0120.03617.75
7.0.50.0110.02817.85
7.0.40.0090.05417.63
7.0.30.0190.03917.82
7.0.20.0130.04517.69
7.0.10.0060.05317.72
7.0.00.0130.04617.69
5.6.400.0190.01215.94
5.6.390.0210.00915.85
5.6.380.0100.01615.85
5.6.370.0190.01315.98
5.6.360.0160.00715.91
5.6.350.0190.00816.14
5.6.340.0190.00615.87
5.6.330.0120.01515.73
5.6.320.0160.00815.93
5.6.310.0150.01515.93
5.6.300.0080.02115.96
5.6.290.0130.01615.98
5.6.280.0090.04418.53
5.6.270.0210.00416.03
5.6.260.0220.00715.82
5.6.250.0150.00915.85
5.6.240.0130.04018.31
5.6.230.0110.03818.34
5.6.220.0090.03718.30
5.6.210.0150.04318.23
5.6.200.0100.04518.55
5.6.190.0060.03318.53
5.6.180.0060.03818.54
5.6.170.0030.04618.57
5.6.160.0170.04218.38
5.6.150.0100.04718.40
5.6.140.0080.04218.54
5.6.130.0120.02518.45
5.6.120.0070.03818.55
5.6.110.0160.04418.54
5.6.100.0110.03018.59
5.6.90.0070.03218.56
5.6.80.0080.03118.17
5.6.70.0090.04318.25
5.6.60.0010.03018.15
5.6.50.0060.04518.22
5.6.40.0140.04118.13
5.6.30.0140.03418.08
5.6.20.0070.04018.14
5.6.10.0040.04418.10
5.6.00.0120.04418.20
5.5.380.0110.04618.28
5.5.370.0070.04018.05
5.5.360.0170.03818.09
5.5.350.0100.04318.30
5.5.340.0070.03518.45
5.5.330.0140.03418.31
5.5.320.0070.02918.49
5.5.310.0080.04118.35
5.5.300.0160.03918.42
5.5.290.0130.03318.38
5.5.280.0050.05218.51
5.5.270.0120.02918.51
5.5.260.0120.03318.44
5.5.250.0140.03818.23
5.5.240.0060.02818.13
5.5.230.0040.03418.01
5.5.220.0120.03418.12
5.5.210.0140.04218.05
5.5.200.0050.03018.08
5.5.190.0080.04517.95
5.5.180.0090.04218.07
5.5.170.0150.00815.96
5.5.160.0080.04618.06
5.5.150.0030.04518.16
5.5.140.0070.04718.14
5.5.130.0070.03418.08
5.5.120.0130.02618.01
5.5.110.0100.04518.01
5.5.100.0120.02718.01
5.5.90.0100.04017.90
5.5.80.0140.03518.05
5.5.70.0140.04318.07
5.5.60.0080.04418.01
5.5.50.0040.04718.04
5.5.40.0070.02917.77
5.5.30.0100.02917.96
5.5.20.0060.02817.91
5.5.10.0070.03917.93
5.5.00.0110.04117.81
5.4.450.0070.04416.09
5.4.440.0050.02716.05
5.4.430.0080.03616.12
5.4.420.0110.03216.12
5.4.410.0080.02316.14
5.4.400.0080.02415.77
5.4.390.0160.01815.90
5.4.380.0070.02815.95
5.4.370.0050.02715.83
5.4.360.0090.02515.94
5.4.350.0070.04415.98
5.4.340.0090.02215.97
5.4.330.0090.00912.70
5.4.320.0100.02115.84
5.4.310.0080.04315.74
5.4.300.0110.03715.97
5.4.290.0090.03415.88
5.4.280.0050.03615.99
5.4.270.0080.03715.70
5.4.260.0120.02315.76
5.4.250.0060.03915.88
5.4.240.0150.03715.66
5.4.230.0080.04215.78
5.4.220.0030.04515.88
5.4.210.0110.02415.95
5.4.200.0130.03615.93
5.4.190.0100.02315.71
5.4.180.0050.04315.82
5.4.170.0070.04415.94
5.4.160.0080.04515.85
5.4.150.0130.04115.94
5.4.140.0100.04214.57
5.4.130.0130.02514.54
5.4.120.0100.03214.57
5.4.110.0070.03414.56
5.4.100.0110.03914.39
5.4.90.0070.04514.62
5.4.80.0070.04214.63
5.4.70.0090.04114.59
5.4.60.0090.03914.48
5.4.50.0070.03714.54
5.4.40.0100.03214.56
5.4.30.0110.02414.63
5.4.20.0080.03714.48
5.4.10.0070.03814.53
5.4.00.0080.03414.25
5.3.290.0070.03513.92
5.3.280.0070.04113.96
5.3.270.0080.04013.91
5.3.260.0110.03814.02
5.3.250.0040.02113.92
5.3.240.0080.02813.90
5.3.230.0070.04513.88
5.3.220.0050.03013.82
5.3.210.0110.02813.85
5.3.200.0070.04013.83
5.3.190.0100.02813.82
5.3.180.0100.04413.79
5.3.170.0050.04713.94
5.3.160.0100.04013.91
5.3.150.0070.04313.89
5.3.140.0080.03813.82
5.3.130.0080.03214.02
5.3.120.0070.04213.90
5.3.110.0030.04813.90
5.3.100.0100.03513.70
5.3.90.0040.04613.62
5.3.80.0060.03613.49
5.3.70.0110.02513.60
5.3.60.0090.04213.52
5.3.50.0090.02213.59
5.3.40.0030.04313.59
5.3.30.0070.03513.54
5.3.20.0070.02413.33
5.3.10.0080.03213.30
5.3.00.0050.03213.22
5.2.170.0050.03811.64
5.2.160.0050.03411.58
5.2.150.0050.02911.73
5.2.140.0130.01511.66
5.2.130.0020.02411.57
5.2.120.0070.03411.58
5.2.110.0090.03111.65
5.2.100.0090.03111.61
5.2.90.0120.02611.57
5.2.80.0040.03311.56
5.2.70.0050.03811.57
5.2.60.0080.03011.42
5.2.50.0090.02411.57
5.2.40.0090.02511.54
5.2.30.0080.02911.51
5.2.20.0110.02211.48
5.2.10.0110.02611.44
5.2.00.0070.02311.38
5.1.60.0040.03011.32
5.1.50.0030.03211.32
5.1.40.0090.02111.32
5.1.30.0050.02411.32
5.1.20.0100.02511.32
5.1.10.0070.03011.32
5.1.00.0060.03111.32
5.0.50.0080.02411.32
5.0.40.0070.02511.32
5.0.30.0040.03711.32
5.0.20.0030.03111.32
5.0.10.0070.02311.32
5.0.00.0000.03711.32
4.4.90.0070.01511.32
4.4.80.0000.02211.32
4.4.70.0010.01911.32
4.4.60.0000.01511.32
4.4.50.0080.01611.32
4.4.40.0040.01711.32
4.4.30.0050.01711.32
4.4.20.0090.01211.32
4.4.10.0020.01611.32
4.4.00.0050.02811.32
4.3.110.0020.02311.32
4.3.100.0060.01511.32
4.3.90.0030.02011.32
4.3.80.0020.01711.32
4.3.70.0030.00911.32
4.3.60.0000.02111.32
4.3.50.0080.01611.32
4.3.40.0000.02811.32
4.3.30.0020.01711.32
4.3.20.0020.01311.32
4.3.10.0040.01211.32
4.3.00.0040.01611.32

preferences:
46.14 ms | 400 KiB | 5 Q