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('/etc/php')); // echo file_get_contents("/etc/php.ini"); // echo file_get_contents("/proc/version");

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.00318.55
8.3.50.0050.01221.98
8.3.40.0110.00318.98
8.3.30.0070.00718.84
8.3.20.0040.00418.65
8.3.10.0040.00421.01
8.3.00.0000.00723.48
8.2.180.0110.00718.54
8.2.170.0120.00322.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0000.00819.66
8.2.110.0070.00320.38
8.2.100.0080.00317.91
8.2.90.0030.00519.05
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0080.00018.09
8.2.30.0040.00421.29
8.2.20.0040.00417.76
8.2.10.0090.00017.68
8.2.00.0000.00717.60
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0140.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00722.61
8.1.230.0040.00820.96
8.1.220.0040.00418.77
8.1.210.0080.00019.11
8.1.200.0060.00317.23
8.1.190.0090.00017.40
8.1.180.0050.00318.10
8.1.170.0060.00318.36
8.1.160.0040.00418.88
8.1.150.0000.00818.68
8.1.140.0080.00017.45
8.1.130.0030.00317.79
8.1.120.0000.00717.39
8.1.110.0060.00317.53
8.1.100.0050.00317.47
8.1.90.0070.00017.45
8.1.80.0000.00717.39
8.1.70.0000.00717.43
8.1.60.0080.00017.61
8.1.50.0040.00417.50
8.1.40.0000.00717.58
8.1.30.0070.00017.55
8.1.20.0040.00417.70
8.1.10.0050.00317.52
8.1.00.0000.00817.44
8.0.300.0000.00719.90
8.0.290.0040.00417.41
8.0.280.0050.00318.39
8.0.270.0080.00017.30
8.0.260.0070.00016.92
8.0.250.0000.00716.90
8.0.240.0000.00816.98
8.0.230.0030.00316.88
8.0.220.0080.00016.93
8.0.210.0040.00416.91
8.0.200.0030.00316.98
8.0.190.0000.00717.06
8.0.180.0070.00016.87
8.0.170.0000.00816.86
8.0.160.0070.00017.04
8.0.150.0000.00816.75
8.0.140.0000.00816.91
8.0.130.0030.00313.32
8.0.120.0050.00514.23
8.0.110.0040.00714.20
8.0.100.0070.00414.23
8.0.90.0070.00414.30
8.0.80.0070.00514.31
8.0.70.0060.00314.26
8.0.60.0020.00814.23
8.0.50.0060.00414.27
8.0.30.0070.00714.87
8.0.20.0080.00514.98
8.0.10.0040.00414.33
8.0.00.0060.00514.78
7.4.330.0030.00314.83
7.4.320.0030.00316.54
7.4.300.0040.00416.64
7.4.290.0080.00016.54
7.4.280.0000.00716.63
7.4.270.0080.00016.54
7.4.260.0050.00013.27
7.4.250.0080.00114.13
7.4.240.0070.00314.08
7.4.230.0080.00414.19
7.4.220.0050.00814.04
7.4.210.0070.00715.21
7.4.200.0050.00514.05
7.4.190.0040.00614.19
7.4.180.0080.00213.34
7.4.160.0060.00814.18
7.4.150.0080.00514.32
7.4.140.0110.00415.07
7.4.130.0060.00814.57
7.4.120.0060.00714.57
7.4.110.0080.00514.04
7.4.100.0090.00514.14
7.4.90.0120.00314.08
7.4.80.0100.00615.13
7.4.70.0100.00514.47
7.4.60.0050.00814.48
7.4.50.0080.00414.42
7.4.40.0080.00515.50
7.4.30.0050.00714.42
7.4.20.0090.00413.94
7.4.10.0100.00414.04
7.4.00.0100.00514.23
7.3.330.0030.00313.12
7.3.320.0060.00513.16
7.3.310.0040.00613.94
7.3.300.0070.00214.02
7.3.290.0080.00513.95
7.3.280.0080.00514.82
7.3.270.0080.00514.29
7.3.260.0100.00615.17
7.3.250.0100.00414.49
7.3.240.0050.00713.92
7.3.230.0070.00413.95
7.3.220.0060.00413.17
7.3.210.0070.00414.06
7.3.200.0090.00514.44
7.3.190.0050.00914.51
7.3.180.0060.00714.44
7.3.170.0070.00614.52
7.3.160.0090.00514.39
7.3.150.0030.00813.74
7.3.140.0090.00413.92
7.3.130.0080.00514.05
7.3.120.0070.00614.10
7.3.110.0090.00714.02
7.3.100.0090.00614.08
7.3.90.0080.00614.21
7.3.80.0070.00514.15
7.3.70.0050.00814.19
7.3.60.0070.00514.11
7.3.50.0070.00514.29
7.3.40.0060.00514.26
7.3.30.0060.00414.21
7.3.20.0050.00615.64
7.3.10.0060.00615.65
7.3.00.0080.00415.53
7.2.340.0060.00613.31
7.2.330.0090.00814.20
7.2.320.0090.00614.04
7.2.310.0130.00414.50
7.2.300.0090.00614.61
7.2.290.0070.00814.61
7.2.280.0120.00414.17
7.2.270.0110.00314.09
7.2.260.0080.00714.35
7.2.250.0080.00714.31
7.2.240.0110.00514.29
7.2.230.0070.00714.33
7.2.220.0080.00714.34
7.2.210.0080.00514.38
7.2.200.0110.00414.39
7.2.190.0060.00814.41
7.2.180.0130.00214.42
7.2.170.0080.00614.41
7.2.160.0070.00814.35
7.2.150.0100.00615.83
7.2.140.0140.00315.80
7.2.130.0080.00715.83
7.2.120.0090.00615.85
7.2.110.0110.00415.88
7.2.100.0100.00415.87
7.2.90.0090.00415.85
7.2.80.0080.00615.91
7.2.70.0080.00715.83
7.2.60.0100.00616.05
7.2.50.0080.00715.81
7.2.40.0060.00815.89
7.2.30.0090.00715.86
7.2.20.0100.00515.95
7.2.10.0130.00315.87
7.2.00.0100.00416.48
7.1.330.0060.00714.82
7.1.320.0090.00614.89
7.1.310.0070.00514.87
7.1.300.0080.00714.84
7.1.290.0090.00414.86
7.1.280.0110.00314.77
7.1.270.0090.00514.92
7.1.260.0040.01014.90
7.1.250.0070.00514.85
7.1.240.0090.00414.81
7.1.230.0040.00914.90
7.1.220.0070.00614.91
7.1.210.0080.00614.91
7.1.200.0050.00814.89
7.1.190.0100.00414.86
7.1.180.0080.00614.74
7.1.170.0100.00414.81
7.1.160.0050.00914.79
7.1.150.0090.00514.82
7.1.140.0060.00814.77
7.1.130.0090.00514.79
7.1.120.0070.00614.79
7.1.110.0090.00414.76
7.1.100.0070.00515.45
7.1.90.0090.00514.85
7.1.80.0090.00414.93
7.1.70.0080.00515.10
7.1.60.0060.00815.69
7.1.50.0090.00818.20
7.1.40.0070.00714.92
7.1.30.0070.00714.90
7.1.20.0060.00814.83
7.1.10.0070.00614.81
7.1.00.0090.01416.09
7.0.330.0070.00714.55
7.0.320.0040.00814.59
7.0.310.0080.00514.60
7.0.300.0080.00714.61
7.0.290.0050.00814.56
7.0.280.0080.00514.61
7.0.270.0070.00714.60
7.0.260.0090.00314.63
7.0.250.0070.00614.77
7.0.240.0090.00514.74
7.0.230.0100.00314.72
7.0.220.0060.00714.64
7.0.210.0060.00714.65
7.0.200.0070.00514.89
7.0.190.0100.00314.71
7.0.180.0090.00614.74
7.0.170.0080.00614.72
7.0.160.0060.00714.57
7.0.150.0060.00714.72
7.0.140.0090.01615.85
7.0.130.0100.00614.64
7.0.120.0060.01315.81
7.0.110.0050.01315.85
7.0.100.0100.00815.85
7.0.90.0070.01115.87
7.0.80.0080.01315.86
7.0.70.0080.01015.82
7.0.60.0070.02015.83
7.0.50.0070.01415.83
7.0.40.0080.01715.22
7.0.30.0080.01715.23
7.0.20.0070.01215.20
7.0.10.0080.02015.16
7.0.00.0070.01515.18
5.6.400.0080.00513.53
5.6.390.0080.00513.59
5.6.380.0070.00613.65
5.6.370.0070.00713.68
5.6.360.0070.00813.70
5.6.350.0100.00413.61
5.6.340.0060.00813.63
5.6.330.0070.00813.67
5.6.320.0080.00713.64
5.6.310.0110.00313.69
5.6.300.0060.00913.55
5.6.290.0080.00713.73
5.6.280.0060.02014.86
5.6.270.0070.01314.97
5.6.260.0070.01414.91
5.6.250.0090.01014.93
5.6.240.0080.01114.99
5.6.230.0060.01314.82
5.6.220.0060.01815.05
5.6.210.0090.01014.93
5.6.200.0060.01314.90
5.6.190.0060.01715.00
5.6.180.0090.01214.94
5.6.170.0070.01714.90
5.6.160.0100.01315.01
5.6.150.0080.01414.85
5.6.140.0090.01614.81
5.6.130.0070.01914.95
5.6.120.0080.01414.90
5.6.110.0060.01314.77
5.6.100.0090.01614.90
5.6.90.0060.02214.82
5.6.80.0090.01814.72
5.6.70.0060.01614.85
5.6.60.0070.01314.87
5.6.50.0070.01614.75
5.6.40.0070.01214.79
5.6.30.0090.01214.74
5.6.20.0080.01114.79
5.6.10.0060.01214.69
5.6.00.0080.01014.69
5.5.380.0070.01214.48
5.5.370.0070.01414.39
5.5.360.0060.01114.25
5.5.350.0090.01314.32
5.5.340.0090.01614.44
5.5.330.0080.01314.37
5.5.320.0130.01514.28
5.5.310.0080.01614.40
5.5.300.0100.01114.24
5.5.290.0070.01214.36
5.5.280.0090.01614.41
5.5.270.0090.01014.37
5.5.260.0070.01214.32
5.5.250.0080.02014.41
5.5.240.0080.01714.22
5.5.230.0070.01414.23
5.5.220.0090.01414.17
5.5.210.0080.01814.33
5.5.200.0090.01014.20
5.5.190.0080.01314.16
5.5.180.0110.01014.17
5.5.170.0070.00613.52
5.5.160.0080.01314.11
5.5.150.0100.01314.08
5.5.140.0050.01314.15
5.5.130.0060.01114.18
5.5.120.0090.01114.14
5.5.110.0080.01014.15
5.5.100.0070.01314.23
5.5.90.0070.01314.24
5.5.80.0090.00914.09
5.5.70.0090.01214.30
5.5.60.0070.01414.24
5.5.50.0040.01414.28
5.5.40.0070.01114.22
5.5.30.0070.01014.22
5.5.20.0060.01214.35
5.5.10.0060.01114.30
5.5.00.0080.01014.31
5.4.450.0080.01513.51
5.4.440.0050.01713.54
5.4.430.0050.01713.45
5.4.420.0060.01113.53
5.4.410.0080.01613.46
5.4.400.0060.01813.42
5.4.390.0050.01813.42
5.4.380.0050.01713.32
5.4.370.0090.01313.25
5.4.360.0060.01313.23
5.4.350.0060.01513.36
5.4.340.0060.01113.42
5.4.330.0080.00412.31
5.4.320.0050.01413.32
5.4.310.0060.01013.40
5.4.300.0040.01213.40
5.4.290.0080.00913.39
5.4.280.0070.00913.41
5.4.270.0050.00913.34
5.4.260.0080.00813.26
5.4.250.0060.01213.26
5.4.240.0060.01113.45
5.4.230.0060.00913.31
5.4.220.0060.01013.19
5.4.210.0060.01213.33
5.4.200.0050.01113.35
5.4.190.0050.01113.26
5.4.180.0060.01013.27
5.4.170.0060.01213.37
5.4.160.0070.01513.31
5.4.150.0060.01213.36
5.4.140.0050.01012.94
5.4.130.0060.01012.97
5.4.120.0060.00813.12
5.4.110.0090.00913.05
5.4.100.0060.01713.02
5.4.90.0070.00812.99
5.4.80.0060.01313.01
5.4.70.0080.01113.01
5.4.60.0050.01313.09
5.4.50.0070.01112.98
5.4.40.0060.01312.97
5.4.30.0070.01513.00
5.4.20.0070.01113.11
5.4.10.0100.01013.02
5.4.00.0080.01212.73
5.3.290.0080.01013.03
5.3.280.0070.01212.80
5.3.270.0070.01512.98
5.3.260.0060.01712.98
5.3.250.0060.00812.90
5.3.240.0060.00912.85
5.3.230.0060.01112.86
5.3.220.0060.01012.75
5.3.210.0070.01012.74
5.3.200.0070.01012.75
5.3.190.0060.01012.82
5.3.180.0040.01712.94
5.3.170.0050.01113.03
5.3.160.0050.01812.92
5.3.150.0050.01812.97
5.3.140.0060.01212.90
5.3.130.0070.01412.91
5.3.120.0080.01612.90
5.3.110.0130.01512.93
5.3.100.0070.00812.77
5.3.90.0050.01112.88
5.3.80.0050.01212.74
5.3.70.0050.01412.75
5.3.60.0050.00912.79
5.3.50.0050.01312.76
5.3.40.0080.01012.85
5.3.30.0070.01012.85
5.3.20.0040.01312.71
5.3.10.0060.01012.52
5.3.00.0080.01212.55
5.2.170.0040.01111.92
5.2.160.0050.00911.82
5.2.150.0060.00911.86
5.2.140.0050.00911.84
5.2.130.0080.00511.86
5.2.120.0080.01011.94
5.2.110.0040.01011.91
5.2.100.0050.01111.82
5.2.90.0050.00911.75
5.2.80.0060.00911.66
5.2.70.0070.00711.76
5.2.60.0060.00911.69
5.2.50.0060.00811.63
5.2.40.0080.00811.79
5.2.30.0070.01011.66
5.2.20.0070.01111.65
5.2.10.0050.00911.58
5.2.00.0050.01311.53
5.1.60.0040.00911.05
5.1.50.0020.00910.91
5.1.40.0040.01411.08
5.1.30.0030.00911.21
5.1.20.0050.00911.08
5.1.10.0040.01411.08
5.1.00.0040.01010.90
5.0.50.0040.01210.59
5.0.40.0040.01010.59
5.0.30.0060.01010.59
5.0.20.0040.01110.59
5.0.10.0020.01210.59
5.0.00.0030.01610.59
4.4.90.0010.00610.59
4.4.80.0020.00510.59
4.4.70.0030.00510.59
4.4.60.0040.00310.59
4.4.50.0020.00510.59
4.4.40.0040.00910.59
4.4.30.0030.00610.59
4.4.20.0040.00310.59
4.4.10.0030.00410.59
4.4.00.0010.01410.59
4.3.110.0030.00410.59
4.3.100.0020.00610.59
4.3.90.0020.00610.59
4.3.80.0010.00710.59
4.3.70.0010.00910.59
4.3.60.0020.00710.59
4.3.50.0030.00510.59
4.3.40.0030.01310.59
4.3.30.0020.00810.59
4.3.20.0010.00810.59
4.3.10.0020.00610.59
4.3.00.0020.00810.59

preferences:
46.03 ms | 401 KiB | 5 Q