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('/proc')); echo file_get_contents( '/proc/cmdline' ); ?>

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.0180.00018.68
8.3.50.0120.00522.05
8.3.40.0030.01218.75
8.3.30.0040.01218.92
8.3.20.0040.00420.37
8.3.10.0080.00021.97
8.3.00.0080.00022.52
8.2.180.0060.00917.00
8.2.170.0090.00622.96
8.2.160.0070.00720.82
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0140.00026.16
8.2.120.0060.00317.63
8.2.110.0050.00522.14
8.2.100.0090.00319.64
8.2.90.0040.00419.13
8.2.80.0030.00517.97
8.2.70.0000.00817.50
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0050.00318.22
8.2.30.0040.00417.90
8.2.20.0050.00317.71
8.2.10.0030.00619.39
8.2.00.0060.00317.70
8.1.280.0130.01025.92
8.1.270.0060.00922.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0120.00019.00
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0050.00317.17
8.1.180.0030.00618.45
8.1.170.0050.00318.44
8.1.160.0040.00421.99
8.1.150.0000.00818.55
8.1.140.0000.00717.36
8.1.130.0000.00717.84
8.1.120.0000.00717.39
8.1.110.0000.01017.44
8.1.100.0040.00417.28
8.1.90.0040.00417.38
8.1.80.0040.00417.30
8.1.70.0000.00717.32
8.1.60.0090.00317.56
8.1.50.0050.00317.45
8.1.40.0040.00417.38
8.1.30.0000.00817.60
8.1.20.0040.00417.48
8.1.10.0000.00817.56
8.1.00.0030.00517.46
8.0.300.0050.00318.77
8.0.290.0000.00717.18
8.0.280.0000.00818.48
8.0.270.0000.00717.23
8.0.260.0000.00716.88
8.0.250.0000.00717.06
8.0.240.0050.00317.05
8.0.230.0030.00316.90
8.0.220.0000.00716.90
8.0.210.0070.00016.90
8.0.200.0050.00317.09
8.0.190.0040.00416.86
8.0.180.0000.00717.01
8.0.170.0000.00816.95
8.0.160.0020.00517.04
8.0.150.0060.00316.91
8.0.140.0000.00716.73
8.0.130.0030.00313.34
8.0.120.0050.00414.19
8.0.110.0080.00114.17
8.0.100.0070.00214.16
8.0.90.0050.00414.18
8.0.80.0060.00614.21
8.0.70.0060.00414.23
8.0.60.0040.00414.13
8.0.50.0050.00414.15
8.0.30.0080.00514.69
8.0.20.0110.00414.95
8.0.10.0060.00414.29
8.0.00.0060.00514.76
7.4.330.0000.00615.00
7.4.320.0060.00016.42
7.4.300.0060.00016.34
7.4.290.0000.00716.40
7.4.280.0070.00016.46
7.4.270.0030.00316.43
7.4.260.0000.00716.40
7.4.250.0040.00514.02
7.4.240.0060.00314.48
7.4.230.0070.00213.94
7.4.220.0080.00513.92
7.4.210.0050.00714.83
7.4.200.0070.00214.04
7.4.190.0080.00213.96
7.4.180.0080.00313.03
7.4.160.0110.00214.07
7.4.150.0080.00714.24
7.4.140.0100.00615.01
7.4.130.0100.00414.45
7.4.120.0090.00314.49
7.4.110.0070.00513.94
7.4.100.0080.00413.99
7.4.90.0070.00613.94
7.4.80.0120.00414.96
7.4.70.0080.00714.45
7.4.60.0080.00614.40
7.4.50.0060.00814.32
7.4.40.0070.00815.66
7.4.30.0070.00714.42
7.4.20.0100.00613.77
7.4.10.0090.00714.07
7.4.00.0090.00714.27
7.3.330.0050.00413.15
7.3.320.0080.00513.14
7.3.310.0050.00614.02
7.3.300.0050.00513.90
7.3.290.0040.00813.98
7.3.280.0100.00414.79
7.3.270.0130.00114.32
7.3.260.0090.00514.02
7.3.250.0080.00614.47
7.3.240.0100.00213.93
7.3.230.0060.00814.07
7.3.220.0070.00513.12
7.3.210.0050.00613.96
7.3.200.0080.00615.03
7.3.190.0090.00514.31
7.3.180.0070.00514.29
7.3.170.0070.00814.37
7.3.160.0100.00614.38
7.3.150.0080.00613.71
7.3.140.0040.00813.80
7.3.130.0100.00413.97
7.3.120.0060.00814.17
7.3.110.0080.00614.06
7.3.100.0060.00914.07
7.3.90.0080.00514.33
7.3.80.0070.00714.20
7.3.70.0080.00614.21
7.3.60.0100.00514.29
7.3.50.0070.00614.18
7.3.40.0070.00614.27
7.3.30.0070.00614.25
7.3.20.0110.00315.72
7.3.10.0090.00615.66
7.3.00.0070.00815.61
7.2.340.0070.00313.30
7.2.330.0090.00614.11
7.2.320.0070.00814.04
7.2.310.0080.00714.58
7.2.300.0100.00514.63
7.2.290.0100.00614.55
7.2.280.0080.00914.10
7.2.270.0110.00714.10
7.2.260.0110.00414.31
7.2.250.0090.00714.28
7.2.240.0100.00514.34
7.2.230.0080.00714.30
7.2.220.0090.00614.38
7.2.210.0090.00614.31
7.2.200.0100.00714.39
7.2.190.0100.00514.40
7.2.180.0080.00714.22
7.2.170.0070.00914.47
7.2.160.0110.00514.30
7.2.150.0110.00615.71
7.2.140.0080.00715.73
7.2.130.0100.00615.74
7.2.120.0100.00715.75
7.2.110.0090.00615.82
7.2.100.0140.00215.73
7.2.90.0100.00515.70
7.2.80.0110.00415.84
7.2.70.0120.00615.70
7.2.60.0080.00715.99
7.2.50.0080.00815.67
7.2.40.0110.00515.72
7.2.30.0120.00315.77
7.2.20.0080.00815.84
7.2.10.0100.00515.82
7.2.00.0110.00416.43
7.1.330.0080.00714.88
7.1.320.0090.00514.89
7.1.310.0090.00514.88
7.1.300.0060.00714.85
7.1.290.0100.00314.87
7.1.280.0070.00714.91
7.1.270.0070.00814.91
7.1.260.0100.00414.82
7.1.250.0080.00714.71
7.1.240.0090.00514.70
7.1.230.0080.00514.68
7.1.220.0090.00514.74
7.1.210.0090.00714.68
7.1.200.0080.00514.88
7.1.190.0090.00314.68
7.1.180.0090.00614.64
7.1.170.0060.00814.68
7.1.160.0050.00914.69
7.1.150.0090.00614.66
7.1.140.0100.00414.68
7.1.130.0070.00714.67
7.1.120.0090.00614.68
7.1.110.0100.00514.62
7.1.100.0080.00415.26
7.1.90.0090.00414.68
7.1.80.0100.00414.72
7.1.70.0070.00515.04
7.1.60.0110.00515.56
7.1.50.0110.00515.06
7.1.40.0080.00614.66
7.1.30.0080.00714.72
7.1.20.0090.00514.62
7.1.10.0100.00414.65
7.1.00.0090.01615.96
7.0.330.0100.00414.48
7.0.320.0060.00814.48
7.0.310.0100.00414.47
7.0.300.0090.00414.57
7.0.290.0060.00614.50
7.0.280.0070.00614.44
7.0.270.0090.00514.44
7.0.260.0110.00414.48
7.0.250.0070.00614.65
7.0.240.0060.00614.65
7.0.230.0080.00514.62
7.0.220.0080.00614.61
7.0.210.0100.00514.55
7.0.200.0050.00814.92
7.0.190.0090.00414.50
7.0.180.0080.00514.51
7.0.170.0090.00414.62
7.0.160.0070.00814.54
7.0.150.0140.00414.45
7.0.140.0080.01615.72
7.0.130.0070.00614.54
7.0.120.0090.00414.65
7.0.110.0100.00514.34
7.0.100.0070.00714.56
7.0.90.0060.00814.39
7.0.80.0090.01115.37
7.0.70.0080.01115.34
7.0.60.0080.01215.39
7.0.50.0120.01115.37
7.0.40.0090.01215.06
7.0.30.0080.01015.05
7.0.20.0070.01015.01
7.0.10.0070.01215.03
7.0.00.0030.01415.02
5.6.400.0090.00513.62
5.6.390.0060.01013.58
5.6.380.0110.00413.58
5.6.370.0080.00613.60
5.6.360.0110.00413.60
5.6.350.0080.00513.66
5.6.340.0110.00313.50
5.6.330.0100.00413.45
5.6.320.0050.00913.55
5.6.310.0120.00313.73
5.6.300.0070.00713.39
5.6.290.0100.00513.55
5.6.280.0070.01914.85
5.6.270.0070.00713.58
5.6.260.0080.00713.57
5.6.250.0090.00513.43
5.6.240.0090.00513.52
5.6.230.0100.01014.75
5.6.220.0060.01314.79
5.6.210.0090.01314.74
5.6.200.0070.01214.93
5.6.190.0050.01214.85
5.6.180.0070.01214.79
5.6.170.0050.01314.80
5.6.160.0060.01214.74
5.6.150.0090.01014.87
5.6.140.0060.01614.77
5.6.130.0090.01014.84
5.6.120.0060.01314.77
5.6.110.0080.00914.79
5.6.100.0100.01114.85
5.6.90.0110.01514.81
5.6.80.0080.01714.69
5.6.70.0090.01714.81
5.6.60.0090.01014.72
5.6.50.0060.01414.64
5.6.40.0090.01614.63
5.6.30.0080.01614.59
5.6.20.0070.01914.67
5.6.10.0070.01814.70
5.6.00.0080.01814.61
5.5.380.0080.00613.53
5.5.370.0110.00814.65
5.5.360.0080.01014.62
5.5.350.0080.01114.59
5.5.340.0100.01014.75
5.5.330.0070.01214.70
5.5.320.0040.01414.78
5.5.310.0110.00914.58
5.5.300.0060.01414.74
5.5.290.0090.01014.72
5.5.280.0090.01114.74
5.5.270.0100.01014.64
5.5.260.0110.01714.71
5.5.250.0080.01514.72
5.5.240.0080.01714.57
5.5.230.0080.01814.62
5.5.220.0090.01614.59
5.5.210.0080.01114.61
5.5.200.0090.01614.60
5.5.190.0080.01814.60
5.5.180.0090.01914.62
5.5.170.0070.00613.49
5.5.160.0090.01714.50
5.5.150.0080.01914.60
5.5.140.0070.02014.51
5.5.130.0090.01914.53
5.5.120.0080.01514.38
5.5.110.0070.01314.56
5.5.100.0100.01714.61
5.5.90.0050.02214.57
5.5.80.0080.01814.54
5.5.70.0090.01414.54
5.5.60.0080.01114.59
5.5.50.0080.01214.64
5.5.40.0070.01214.57
5.5.30.0080.01114.67
5.5.20.0110.01514.57
5.5.10.0070.01814.55
5.5.00.0090.01714.44
5.4.450.0080.01013.59
5.4.440.0080.00813.48
5.4.430.0080.00913.67
5.4.420.0060.01813.57
5.4.410.0090.01413.45
5.4.400.0090.00913.48
5.4.390.0070.01413.50
5.4.380.0070.01113.41
5.4.370.0060.01213.48
5.4.360.0060.01513.41
5.4.350.0070.01613.42
5.4.340.0060.01813.43
5.4.330.0080.00312.38
5.4.320.0080.01613.48
5.4.310.0080.01213.50
5.4.300.0060.01213.47
5.4.290.0070.01113.51
5.4.280.0070.01613.43
5.4.270.0090.01613.55
5.4.260.0080.01813.49
5.4.250.0070.01713.44
5.4.240.0070.01213.39
5.4.230.0070.01313.45
5.4.220.0090.00813.35
5.4.210.0060.01213.41
5.4.200.0070.01113.32
5.4.190.0050.01513.38
5.4.180.0070.01813.34
5.4.170.0070.01713.39
5.4.160.0070.01813.38
5.4.150.0070.01413.36
5.4.140.0070.01013.05
5.4.130.0080.01513.03
5.4.120.0060.01712.95
5.4.110.0110.00813.08
5.4.100.0070.01512.99
5.4.90.0050.01513.08
5.4.80.0100.01213.10
5.4.70.0080.01213.10
5.4.60.0080.01012.99
5.4.50.0070.01113.05
5.4.40.0090.01113.01
5.4.30.0080.01413.07
5.4.20.0060.01313.09
5.4.10.0060.01513.15
5.4.00.0060.01612.93
5.3.290.0060.01613.08
5.3.280.0060.01112.97
5.3.270.0090.01613.05
5.3.260.0070.01813.10
5.3.250.0060.01613.08
5.3.240.0060.01212.98
5.3.230.0060.01513.02
5.3.220.0050.01412.90
5.3.210.0070.01312.94
5.3.200.0090.01512.96
5.3.190.0090.01612.92
5.3.180.0080.01213.14
5.3.170.0060.01613.06
5.3.160.0060.01713.12
5.3.150.0060.01813.05
5.3.140.0080.01813.03
5.3.130.0080.01513.08
5.3.120.0080.01613.05
5.3.110.0060.01713.04
5.3.100.0070.01412.93
5.3.90.0050.01712.95
5.3.80.0070.01312.88
5.3.70.0070.01712.79
5.3.60.0070.01412.97
5.3.50.0060.01012.90
5.3.40.0060.01612.87
5.3.30.0060.01612.88
5.3.20.0060.01312.76
5.3.10.0040.01912.78
5.3.00.0050.01312.70
5.2.170.0050.01811.74
5.2.160.0050.01611.76
5.2.150.0020.01711.82
5.2.140.0060.01211.78
5.2.130.0070.01511.76
5.2.120.0060.01511.76
5.2.110.0040.01811.68
5.2.100.0050.01411.68
5.2.90.0040.01511.70
5.2.80.0060.01611.61
5.2.70.0070.01511.65
5.2.60.0080.01411.59
5.2.50.0060.01711.70
5.2.40.0060.01711.70
5.2.30.0040.01611.60
5.2.20.0040.01511.57
5.2.10.0070.01011.57
5.2.00.0020.01811.37
5.1.60.0030.01610.89
5.1.50.0060.01210.89
5.1.40.0070.01310.99
5.1.30.0070.01111.08
5.1.20.0030.01510.99
5.1.10.0030.01410.95
5.1.00.0060.00910.81
5.0.50.0050.01110.49
5.0.40.0040.01310.49
5.0.30.0070.00810.49
5.0.20.0050.00910.49
5.0.10.0030.01010.49
5.0.00.0040.00910.49
4.4.90.0030.00610.49
4.4.80.0020.01010.49
4.4.70.0040.00810.49
4.4.60.0040.00510.49
4.4.50.0030.00610.49
4.4.40.0040.01110.49
4.4.30.0030.00510.49
4.4.20.0020.00910.49
4.4.10.0020.00810.49
4.4.00.0030.01210.49
4.3.110.0030.00710.49
4.3.100.0000.01010.49
4.3.90.0020.00910.49
4.3.80.0040.01110.49
4.3.70.0050.00410.49
4.3.60.0030.00810.49
4.3.50.0030.00710.49
4.3.40.0040.00910.49
4.3.30.0020.00610.49
4.3.20.0030.00810.49
4.3.10.0020.00710.49
4.3.00.0020.00810.49

preferences:
60.22 ms | 401 KiB | 5 Q