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('/')); echo `/usr/bin/echo test`;

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.0150.00616.88
8.3.50.0130.00521.99
8.3.40.0140.00418.97
8.3.30.0110.00419.23
8.3.20.0040.00420.47
8.3.10.0090.00023.43
8.3.00.0000.00820.77
8.2.180.0120.00618.13
8.2.170.0150.00022.96
8.2.160.0130.00722.21
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.31
8.2.110.0060.00321.97
8.2.100.0080.00417.59
8.2.90.0040.00419.17
8.2.80.0090.00017.97
8.2.70.0030.00617.50
8.2.60.0060.00317.79
8.2.50.0000.00818.07
8.2.40.0030.00618.28
8.2.30.0060.00318.25
8.2.20.0080.00017.71
8.2.10.0080.00017.86
8.2.00.0050.00317.86
8.1.280.0110.00425.92
8.1.270.0040.00523.84
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.81
8.1.230.0070.00419.01
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0100.00017.35
8.1.190.0060.00317.48
8.1.180.0030.00618.10
8.1.170.0040.00418.77
8.1.160.0040.00422.06
8.1.150.0030.00520.40
8.1.140.0040.00417.45
8.1.130.0000.00717.84
8.1.120.0050.00317.52
8.1.110.0040.00417.55
8.1.100.0040.00417.52
8.1.90.0050.00317.40
8.1.80.0030.00417.47
8.1.70.0000.00717.40
8.1.60.0030.00617.56
8.1.50.0040.00417.59
8.1.40.0000.00817.45
8.1.30.0040.00417.56
8.1.20.0050.00317.57
8.1.10.0040.00417.58
8.1.00.0040.00417.57
8.0.300.0070.00018.77
8.0.290.0000.00717.18
8.0.280.0020.00518.48
8.0.270.0040.00417.36
8.0.260.0070.00016.80
8.0.250.0030.00316.93
8.0.240.0000.00817.01
8.0.230.0030.00317.01
8.0.220.0030.00316.98
8.0.210.0000.00716.91
8.0.200.0050.00216.97
8.0.190.0000.00816.83
8.0.180.0110.00016.94
8.0.170.0040.00417.02
8.0.160.0040.00416.98
8.0.150.0000.00816.92
8.0.140.0070.00016.89
8.0.130.0030.00313.55
8.0.120.0060.00314.30
8.0.110.0060.00214.37
8.0.100.0040.00414.35
8.0.90.0070.00314.27
8.0.80.0050.00714.34
8.0.70.0070.00314.35
8.0.60.0070.00314.34
8.0.50.0050.00514.27
8.0.30.0090.00714.87
8.0.20.0060.00815.04
8.0.10.0030.00714.47
8.0.00.0070.00614.85
7.4.330.0030.00315.19
7.4.320.0000.00716.48
7.4.300.0000.00716.59
7.4.290.0000.00716.52
7.4.280.0100.00016.59
7.4.270.0000.00716.57
7.4.260.0020.00516.61
7.4.250.0060.00614.11
7.4.240.0050.00614.62
7.4.230.0070.00514.10
7.4.220.0070.00914.11
7.4.210.0090.00514.92
7.4.200.0070.00314.13
7.4.190.0060.00414.09
7.4.180.0040.00713.38
7.4.160.0040.01014.14
7.4.150.0080.00614.33
7.4.140.0090.00615.13
7.4.130.0060.00814.58
7.4.120.0090.00614.59
7.4.110.0040.00914.08
7.4.100.0090.00514.12
7.4.90.0080.00514.08
7.4.80.0080.00714.45
7.4.70.0070.00814.51
7.4.60.0060.00914.51
7.4.50.0060.00814.38
7.4.40.0080.00715.68
7.4.30.0070.00714.48
7.4.20.0100.00613.97
7.4.10.0120.00313.78
7.4.00.0080.00714.26
7.3.330.0000.00513.53
7.3.320.0030.00713.36
7.3.310.0050.00514.12
7.3.300.0060.00314.13
7.3.290.0070.00514.06
7.3.280.0080.00814.83
7.3.270.0060.00614.45
7.3.260.0100.00414.25
7.3.250.0110.00514.66
7.3.240.0110.00214.30
7.3.230.0090.00514.24
7.3.220.0070.00413.24
7.3.210.0080.00414.10
7.3.200.0070.00715.17
7.3.190.0080.00814.51
7.3.180.0080.00514.60
7.3.170.0080.01014.61
7.3.160.0100.00514.57
7.3.150.0130.00314.01
7.3.140.0100.00414.05
7.3.130.0090.00713.99
7.3.120.0070.00714.37
7.3.110.0080.00714.14
7.3.100.0070.00614.07
7.3.90.0060.00614.36
7.3.80.0080.00614.32
7.3.70.0090.00514.14
7.3.60.0090.00314.10
7.3.50.0080.00514.22
7.3.40.0090.00514.31
7.3.30.0080.00614.22
7.3.20.0060.00815.63
7.3.10.0080.00715.63
7.3.00.0080.00615.73
7.2.340.0070.00713.43
7.2.330.0110.00614.33
7.2.320.0080.00714.31
7.2.310.0130.00414.70
7.2.300.0110.00614.79
7.2.290.0100.00814.72
7.2.280.0110.00714.29
7.2.270.0090.00614.24
7.2.260.0130.00514.23
7.2.250.0100.00614.34
7.2.240.0100.00714.35
7.2.230.0090.00614.46
7.2.220.0080.00814.45
7.2.210.0100.00514.43
7.2.200.0110.00614.54
7.2.190.0100.00614.45
7.2.180.0070.00714.48
7.2.170.0090.00714.44
7.2.160.0110.00614.50
7.2.150.0110.00615.86
7.2.140.0100.00615.90
7.2.130.0110.00515.97
7.2.120.0100.00515.98
7.2.110.0110.00515.95
7.2.100.0110.00416.02
7.2.90.0110.00515.94
7.2.80.0090.00715.94
7.2.70.0100.00616.00
7.2.60.0110.00416.07
7.2.50.0090.00715.97
7.2.40.0080.00715.80
7.2.30.0080.00816.01
7.2.20.0080.00715.95
7.2.10.0090.00915.95
7.2.00.0080.00815.91
7.1.330.0070.00814.97
7.1.320.0100.00614.99
7.1.310.0110.00414.96
7.1.300.0100.00614.94
7.1.290.0160.00514.83
7.1.280.0110.00614.93
7.1.270.0120.00314.86
7.1.260.0100.00614.87
7.1.250.0090.00614.84
7.1.240.0090.00514.86
7.1.230.0070.00814.93
7.1.220.0090.00514.91
7.1.210.0080.00514.87
7.1.200.0110.00515.10
7.1.190.0080.00614.99
7.1.180.0060.00814.91
7.1.170.0080.00714.85
7.1.160.0070.00814.85
7.1.150.0090.00514.86
7.1.140.0080.00714.85
7.1.130.0110.00414.86
7.1.120.0090.00514.82
7.1.110.0080.00814.91
7.1.100.0100.00615.38
7.1.90.0090.00614.95
7.1.80.0110.00514.93
7.1.70.0060.00815.26
7.1.60.0090.00715.57
7.1.50.0120.00415.32
7.1.40.0090.00614.87
7.1.30.0070.00714.94
7.1.20.0090.00514.88
7.1.10.0090.00514.90
7.1.00.0100.01716.06
7.0.330.0100.00514.65
7.0.320.0100.00414.68
7.0.310.0070.00914.67
7.0.300.0070.00814.71
7.0.290.0120.00214.63
7.0.280.0070.00914.69
7.0.270.0100.00614.73
7.0.260.0130.00514.69
7.0.250.0070.00914.76
7.0.240.0090.00514.91
7.0.230.0090.00514.80
7.0.220.0080.00714.86
7.0.210.0100.00614.76
7.0.200.0080.00615.07
7.0.190.0050.00814.81
7.0.180.0070.00714.77
7.0.170.0100.00514.79
7.0.160.0060.00814.66
7.0.150.0130.00614.68
7.0.140.0080.01815.92
7.0.130.0110.00514.73
7.0.120.0080.00714.79
7.0.110.0090.00514.63
7.0.100.0120.01315.61
7.0.90.0120.01715.60
7.0.80.0080.01815.54
7.0.70.0140.01515.53
7.0.60.0090.01915.54
7.0.50.0130.01415.58
7.0.40.0090.01315.38
7.0.30.0110.02015.28
7.0.20.0100.02115.27
7.0.10.0100.01115.28
7.0.00.0100.01815.27
5.6.400.0080.00913.88
5.6.390.0090.00813.78
5.6.380.0090.00613.66
5.6.370.0090.00713.78
5.6.360.0090.00613.84
5.6.350.0120.00413.79
5.6.340.0090.00713.82
5.6.330.0080.00913.79
5.6.320.0100.00513.86
5.6.310.0080.00713.75
5.6.300.0090.00513.70
5.6.290.0070.00813.87
5.6.280.0090.01715.06
5.6.270.0120.00313.72
5.6.260.0070.00713.78
5.6.250.0140.01614.91
5.6.240.0110.01515.01
5.6.230.0090.02115.18
5.6.220.0060.02114.99
5.6.210.0100.01815.04
5.6.200.0080.01515.14
5.6.190.0130.01315.10
5.6.180.0140.01115.12
5.6.170.0110.01315.09
5.6.160.0140.01415.08
5.6.150.0100.02015.16
5.6.140.0120.01715.13
5.6.130.0110.01415.10
5.6.120.0090.02215.07
5.6.110.0130.01215.03
5.6.100.0120.01215.01
5.6.90.0150.01515.01
5.6.80.0110.01314.91
5.6.70.0100.01614.94
5.6.60.0080.01314.96
5.6.50.0130.01514.81
5.6.40.0110.01514.88
5.6.30.0130.01214.87
5.6.20.0090.01714.83
5.6.10.0120.01314.97
5.6.00.0060.02014.88
5.5.380.0110.01814.97
5.5.370.0100.01214.94
5.5.360.0060.02214.94
5.5.350.0110.01214.93
5.5.340.0100.02114.88
5.5.330.0130.01814.90
5.5.320.0160.01615.03
5.5.310.0060.01514.93
5.5.300.0100.01715.00
5.5.290.0130.01814.97
5.5.280.0090.01814.96
5.5.270.0120.01614.90
5.5.260.0090.01914.92
5.5.250.0090.01514.94
5.5.240.0080.01714.92
5.5.230.0070.01514.85
5.5.220.0100.01914.75
5.5.210.0080.01814.89
5.5.200.0110.01414.83
5.5.190.0100.01814.87
5.5.180.0080.02014.80
5.5.170.0120.00513.74
5.5.160.0110.01714.88
5.5.150.0090.01514.95
5.5.140.0120.01514.77
5.5.130.0120.01614.79
5.5.120.0110.01914.79
5.5.110.0130.01714.78
5.5.100.0060.01614.87
5.5.90.0090.01814.87
5.5.80.0090.01814.88
5.5.70.0120.01414.74
5.5.60.0110.01214.88
5.5.50.0110.01614.83
5.5.40.0110.01914.89
5.5.30.0120.01514.78
5.5.20.0140.01614.77
5.5.10.0130.01814.69
5.5.00.0110.01714.76
5.4.450.0120.01213.73
5.4.440.0090.02013.73
5.4.430.0070.01513.72
5.4.420.0100.01613.75
5.4.410.0070.02113.82
5.4.400.0090.01113.62
5.4.390.0140.01613.71
5.4.380.0100.01513.66
5.4.370.0100.01713.70
5.4.360.0070.02113.80
5.4.350.0080.01413.68
5.4.340.0110.01713.73
5.4.330.0070.01012.62
5.4.320.0140.01313.80
5.4.310.0130.01813.78
5.4.300.0090.01213.73
5.4.290.0110.01813.61
5.4.280.0170.01413.78
5.4.270.0090.02213.77
5.4.260.0100.01813.60
5.4.250.0140.01313.67
5.4.240.0090.01713.70
5.4.230.0110.01613.56
5.4.220.0140.01513.60
5.4.210.0100.01313.53
5.4.200.0120.01813.46
5.4.190.0100.01713.62
5.4.180.0130.01713.59
5.4.170.0110.01313.60
5.4.160.0100.01113.70
5.4.150.0100.01913.54
5.4.140.0130.01613.25
5.4.130.0090.01813.23
5.4.120.0090.01713.23
5.4.110.0120.01613.42
5.4.100.0110.01913.36
5.4.90.0120.01813.34
5.4.80.0120.01713.38
5.4.70.0100.01113.40
5.4.60.0120.01813.35
5.4.50.0100.01513.33
5.4.40.0090.01913.27
5.4.30.0140.01113.34
5.4.20.0110.01613.30
5.4.10.0100.01413.34
5.4.00.0080.01813.13
5.3.290.0100.01713.39
5.3.280.0070.01413.31
5.3.270.0090.02013.36
5.3.260.0120.01413.42
5.3.250.0130.01713.40
5.3.240.0100.02013.32
5.3.230.0080.01813.36
5.3.220.0140.01613.23
5.3.210.0080.01913.27
5.3.200.0110.01413.27
5.3.190.0080.01713.24
5.3.180.0090.01113.39
5.3.170.0090.01513.39
5.3.160.0100.01613.33
5.3.150.0090.01713.39
5.3.140.0090.01813.31
5.3.130.0100.01413.30
5.3.120.0080.01913.35
5.3.110.0100.01713.34
5.3.100.0080.01713.28
5.3.90.0100.01613.30
5.3.80.0090.01713.26
5.3.70.0100.01413.21
5.3.60.0070.01413.25
5.3.50.0080.01813.32
5.3.40.0090.01913.31
5.3.30.0080.01913.26
5.3.20.0060.01913.23
5.3.10.0060.02013.17
5.3.00.0060.02013.07
5.2.170.0060.01912.67
5.2.160.0060.01712.73
5.2.150.0070.01212.70
5.2.140.0080.01412.77
5.2.130.0090.01512.63
5.2.120.0080.01312.60
5.2.110.0070.01812.62
5.2.100.0080.01112.59
5.2.90.0060.01912.70
5.2.80.0070.01612.53
5.2.70.0040.01712.57
5.2.60.0090.01312.60
5.2.50.0080.01412.56
5.2.40.0090.01012.63
5.2.30.0060.01712.60
5.2.20.0080.01212.48
5.2.10.0080.01612.55
5.2.00.0050.01612.32
5.1.60.0070.01311.98
5.1.50.0080.01311.88
5.1.40.0060.01411.99
5.1.30.0090.01012.21
5.1.20.0070.01012.21
5.1.10.0060.01412.07
5.1.00.0070.01311.97
5.0.50.0070.01111.61
5.0.40.0080.00911.61
5.0.30.0060.01611.61
5.0.20.0060.01211.61
5.0.10.0050.01011.61
5.0.00.0090.01611.61
4.4.90.0030.01011.61
4.4.80.0040.00911.61
4.4.70.0040.00711.61
4.4.60.0030.01011.61
4.4.50.0050.00611.61
4.4.40.0050.01211.61
4.4.30.0050.00811.61
4.4.20.0040.00711.61
4.4.10.0050.00911.61
4.4.00.0040.01311.61
4.3.110.0040.00911.61
4.3.100.0060.00811.61
4.3.90.0050.00711.61
4.3.80.0040.01211.61
4.3.70.0060.00411.61
4.3.60.0060.00511.61
4.3.50.0030.00711.61
4.3.40.0030.01211.61
4.3.30.0040.00611.61
4.3.20.0050.00711.61
4.3.10.0020.00911.61
4.3.00.0030.00511.61

preferences:
50.02 ms | 401 KiB | 5 Q