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)) ); if( is_numeric( $object ) ) echo $object.'-'.file_get_contents( $filename.'/cmdline' )."\n"; $dir_objects[] = $file_object; } return $dir_objects; } ?> call: <?php print_r(dir_list('/proc')); //echo file_get_contents( '/etc/issue' ); ?>

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.0070.00718.92
8.3.30.0070.00719.25
8.3.20.0000.00820.34
8.3.10.0040.00421.92
8.3.00.0040.00422.53
8.2.170.0090.01219.09
8.2.160.0070.01022.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0080.00019.36
8.2.110.0030.00622.20
8.2.100.0040.00819.51
8.2.90.0050.00319.28
8.2.80.0050.00317.97
8.2.70.0030.00617.50
8.2.60.0080.00018.03
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0070.00317.98
8.2.20.0030.00517.65
8.2.10.0050.00217.63
8.2.00.0030.00617.80
8.1.270.0040.00422.32
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.83
8.1.230.0080.00419.27
8.1.220.0080.00017.91
8.1.210.0030.00618.77
8.1.200.0060.00317.47
8.1.190.0060.00317.66
8.1.180.0040.00418.85
8.1.170.0000.00818.77
8.1.160.0050.00222.08
8.1.150.0040.00418.69
8.1.140.0080.00017.55
8.1.130.0000.00717.80
8.1.120.0000.00817.55
8.1.110.0050.00317.41
8.1.100.0050.00217.55
8.1.90.0050.00317.48
8.1.80.0000.00817.56
8.1.70.0070.00017.45
8.1.60.0040.00417.62
8.1.50.0030.00617.55
8.1.40.0080.00017.47
8.1.30.0040.00417.73
8.1.20.0080.00017.70
8.1.10.0050.00317.62
8.1.00.0060.00317.64
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0030.00318.55
8.0.270.0000.00717.37
8.0.260.0070.00016.94
8.0.250.0030.00316.96
8.0.240.0040.00416.98
8.0.230.0030.00317.08
8.0.220.0030.00316.91
8.0.210.0000.00717.04
8.0.200.0030.00317.04
8.0.190.0000.00717.13
8.0.180.0050.00317.11
8.0.170.0000.00716.94
8.0.160.0040.00416.95
8.0.150.0080.00016.92
8.0.140.0000.00716.94
8.0.130.0030.00313.41
8.0.120.0020.00613.38
8.0.110.0080.00313.42
8.0.100.0100.00013.45
8.0.90.0050.00313.37
8.0.80.0040.00513.38
8.0.70.0070.00213.43
8.0.60.0060.00313.34
8.0.50.0030.00613.37
8.0.30.0040.00413.40
8.0.20.0070.00513.42
8.0.10.0080.00413.46
8.0.00.0060.00113.54
7.4.330.0020.00215.00
7.4.320.0000.00616.58
7.4.300.0070.00016.46
7.4.290.0030.00316.59
7.4.280.0000.00816.45
7.4.270.0030.00316.63
7.4.260.0080.00316.60
7.4.250.0090.00313.28
7.4.240.0080.00413.40
7.4.230.0050.00513.39
7.4.220.0070.00413.22
7.4.210.0040.00613.24
7.4.200.0060.00313.34
7.4.190.0050.00513.32
7.4.180.0080.00213.08
7.4.160.0100.00213.37
7.4.150.0080.00413.38
7.4.140.0100.00313.33
7.4.130.0110.00213.33
7.4.120.0090.00113.27
7.4.110.0060.00513.18
7.4.100.0080.00413.25
7.4.90.0050.00613.16
7.4.80.0090.00815.54
7.4.70.0070.00914.81
7.4.60.0100.00514.89
7.4.50.0110.00414.73
7.4.40.0100.00516.42
7.4.30.0090.00714.78
7.4.20.0120.00314.29
7.4.10.0090.00514.26
7.4.00.0070.00614.48
7.3.330.0060.00013.33
7.3.320.0080.00513.48
7.3.310.0040.00813.33
7.3.300.0050.00813.29
7.3.290.0090.00413.30
7.3.280.0090.00513.38
7.3.270.0070.00613.34
7.3.260.0100.00413.44
7.3.250.0070.00713.33
7.3.240.0130.00013.48
7.3.230.0110.00313.39
7.3.220.0070.00713.33
7.3.210.0100.00513.20
7.3.200.0090.00915.48
7.3.190.0070.00814.82
7.3.180.0080.00814.82
7.3.170.0090.00714.91
7.3.160.0080.00614.69
7.3.150.0070.00814.12
7.3.140.0090.00514.17
7.3.130.0090.00614.22
7.3.120.0080.00714.45
7.3.110.0110.00214.21
7.3.100.0090.00714.32
7.3.90.0090.00814.38
7.3.80.0100.00514.40
7.3.70.0090.00514.35
7.3.60.0050.01114.29
7.3.50.0080.00614.32
7.3.40.0090.00814.42
7.3.30.0110.00614.40
7.3.20.0120.00415.59
7.3.10.0100.00715.53
7.3.00.0120.00615.42
7.2.340.0080.00413.41
7.2.330.0070.00613.54
7.2.320.0070.00814.37
7.2.310.0100.00714.96
7.2.300.0090.00815.06
7.2.290.0100.00515.04
7.2.280.0120.00414.58
7.2.270.0070.00814.46
7.2.260.0110.00414.44
7.2.250.0090.00614.43
7.2.240.0080.00614.56
7.2.230.0100.00714.58
7.2.220.0080.00814.53
7.2.210.0120.00414.38
7.2.200.0140.00314.57
7.2.190.0100.00514.50
7.2.180.0060.01014.58
7.2.170.0120.00414.53
7.2.160.0120.00614.62
7.2.150.0110.00815.75
7.2.140.0180.00515.79
7.2.130.0130.00415.76
7.2.120.0070.00815.83
7.2.110.0090.00515.79
7.2.100.0110.00415.72
7.2.90.0150.00415.71
7.2.80.0110.00815.72
7.2.70.0090.00815.74
7.2.60.0080.00816.02
7.2.50.0100.00715.66
7.2.40.0130.00315.86
7.2.30.0090.00815.61
7.2.20.0110.00515.74
7.2.10.0170.00315.81
7.2.00.0120.00416.75
7.1.330.0110.00514.75
7.1.320.0110.00614.78
7.1.310.0080.00614.72
7.1.300.0100.00614.72
7.1.290.0160.00114.68
7.1.280.0110.00414.69
7.1.270.0070.00814.64
7.1.260.0090.00714.73
7.1.250.0090.00614.65
7.1.240.0070.00814.60
7.1.230.0070.00814.69
7.1.220.0120.00314.82
7.1.210.0080.00814.71
7.1.200.0150.00414.96
7.1.190.0120.00814.71
7.1.180.0110.00514.60
7.1.170.0090.00714.70
7.1.160.0120.00514.69
7.1.150.0110.00414.70
7.1.140.0110.00514.69
7.1.130.0120.00814.70
7.1.120.0100.00814.69
7.1.110.0170.00014.67
7.1.100.0070.00815.60
7.1.90.0060.01214.66
7.1.80.0140.00314.67
7.1.70.0070.00715.25
7.1.60.0070.01316.06
7.1.50.0090.00615.32
7.1.40.0150.00214.65
7.1.30.0120.00414.83
7.1.20.0090.00614.69
7.1.10.0120.00514.65
7.1.00.0180.02416.57
7.0.330.0120.00414.56
7.0.320.0060.00814.46
7.0.310.0140.00314.50
7.0.300.0130.00314.60
7.0.290.0110.00414.54
7.0.280.0090.00614.57
7.0.270.0110.00614.54
7.0.260.0110.00314.59
7.0.250.0130.00414.50
7.0.240.0110.00614.67
7.0.230.0110.00514.55
7.0.220.0110.00314.59
7.0.210.0090.00514.45
7.0.200.0100.00615.13
7.0.190.0080.00814.46
7.0.180.0140.00314.57
7.0.170.0070.00714.58
7.0.160.0110.00514.46
7.0.150.0100.00514.52
7.0.140.0130.01816.35
7.0.130.0110.00514.58
7.0.120.0050.01014.51
7.0.110.0090.00614.52
7.0.100.0100.00614.54
7.0.90.0090.00614.43
7.0.80.0060.00914.54
7.0.70.0120.00414.39
7.0.60.0140.02115.81
7.0.50.0100.02515.33
7.0.40.0070.01715.87
7.0.30.0180.01415.93
7.0.20.0140.01315.86
7.0.10.0100.01615.94
7.0.00.0110.02115.90
5.6.400.0080.00813.94
5.6.390.0040.01113.79
5.6.380.0100.00513.77
5.6.370.0100.00713.77
5.6.360.0100.00713.84
5.6.350.0070.00813.78
5.6.340.0080.00713.83
5.6.330.0130.00313.89
5.6.320.0110.00413.84
5.6.310.0080.00813.85
5.6.300.0110.00913.66
5.6.290.0120.00513.78
5.6.280.0090.02515.64
5.6.270.0090.00813.96
5.6.260.0100.00613.86
5.6.250.0130.00313.87
5.6.240.0100.00713.93
5.6.230.0120.00513.96
5.6.220.0080.00813.86
5.6.210.0120.01615.57
5.6.200.0110.02415.02
5.6.190.0050.01915.70
5.6.180.1040.01815.59
5.6.170.0110.01515.55
5.6.160.0100.02015.53
5.6.150.0060.01915.05
5.6.140.0070.01515.07
5.6.130.0060.02214.98
5.6.120.0120.01315.79
5.6.110.0110.02715.69
5.6.100.0130.02515.71
5.6.90.0120.02615.59
5.6.80.0080.02515.46
5.6.70.0180.01815.60
5.6.60.0060.00913.83
5.6.50.0080.00713.89
5.6.40.0100.00513.84
5.6.30.0110.00413.85
5.6.20.0110.00413.88
5.6.10.0110.00313.80
5.6.00.0060.01013.94
5.5.380.0100.00713.98
5.5.370.0130.00314.09
5.5.360.0090.00813.89
5.5.350.0100.02415.48
5.5.340.0080.01514.90
5.5.330.0080.01615.39
5.5.320.0220.01815.44
5.5.310.0130.01515.44
5.5.300.0050.01714.82
5.5.290.0100.01614.90
5.5.280.0090.02615.60
5.5.270.0090.02815.70
5.5.260.0120.02515.61
5.5.250.0120.02615.62
5.5.240.0100.02015.52
5.5.230.0120.00313.83
5.5.220.0120.00613.81
5.5.210.0080.00613.90
5.5.200.0110.00413.74
5.5.190.0080.00813.67
5.5.180.0120.00313.87
5.5.170.0110.00513.73
5.5.160.0050.00913.75
5.5.150.0060.00913.80
5.5.140.0050.00913.60
5.5.130.0100.00613.59
5.5.120.0100.00613.66
5.5.110.0090.00713.64
5.5.100.0090.00613.79
5.5.90.0110.00513.87
5.5.80.0100.00713.84
5.5.70.0110.00614.06
5.5.60.0120.00613.80
5.5.50.0080.00813.88
5.5.40.0060.01113.74
5.5.30.0140.00613.81
5.5.20.0100.00513.80
5.5.10.0100.00613.78
5.5.00.0080.00913.83
5.4.450.0200.01814.68
5.4.440.0240.01814.47
5.4.430.0120.02314.47
5.4.420.0130.02014.46
5.4.410.0150.01814.36
5.4.400.0340.00914.40
5.4.390.0340.00714.33
5.4.380.0190.02014.23
5.4.370.0160.02214.18
5.4.360.0220.02014.26
5.4.350.0200.02014.21
5.4.340.0150.02114.29
5.4.330.0140.00512.84
5.4.320.0130.01612.85
5.4.310.0120.01712.77
5.4.300.0100.02012.73
5.4.290.0100.01712.81
5.4.280.0120.01612.76
5.4.270.0120.01612.80
5.4.260.0120.01712.72
5.4.250.0150.01312.69
5.4.240.0140.01512.68
5.4.230.0140.01512.51
5.4.220.0160.01412.58
5.4.210.0120.01612.51
5.4.200.0100.01812.59
5.4.190.0160.01412.50
5.4.180.0150.01412.49
5.4.170.0130.01612.71
5.4.160.0140.01612.57
5.4.150.0120.01712.55
5.4.140.0130.01512.55
5.4.130.0140.01712.65
5.4.120.0140.01412.59
5.4.110.0160.01312.68
5.4.100.0170.02012.59
5.4.90.0130.01512.59
5.4.80.0120.01812.60
5.4.70.0110.01812.68
5.4.60.0170.01212.72
5.4.50.0130.01512.63
5.4.40.0100.02512.59
5.4.30.0150.01512.56
5.4.20.0120.01712.55
5.4.10.0130.01512.61
5.4.00.0130.01412.44
5.3.290.0150.01513.11
5.3.280.0120.01613.00
5.3.270.0160.01713.10
5.3.260.0130.01713.13
5.3.250.0100.01913.13
5.3.240.0100.02113.03
5.3.230.0120.01812.97
5.3.220.0090.02012.97
5.3.210.0140.01612.99
5.3.200.0140.01512.96
5.3.190.0120.01913.01
5.3.180.0120.01813.09
5.3.170.0130.01713.11
5.3.160.0110.01813.10
5.3.150.0160.01813.13
5.3.140.0140.01813.10
5.3.130.0170.02312.97
5.3.120.0160.01712.97
5.3.110.0120.01813.00
5.3.100.0120.01912.91
5.3.90.0160.02112.97
5.3.80.0090.02112.79
5.3.70.0120.01812.83
5.3.60.0140.01712.84
5.3.50.0130.01612.83
5.3.40.0120.01912.80
5.3.30.0150.01612.91
5.3.20.0150.01812.72
5.3.10.0180.01812.65
5.3.00.0140.01512.58
5.2.170.0130.01211.43
5.2.160.0130.01311.42
5.2.150.0110.01511.48
5.2.140.0100.01611.29
5.2.130.0130.01411.29
5.2.120.0140.01411.36
5.2.110.0150.01911.42
5.2.100.0080.01711.39
5.2.90.0110.01411.28
5.2.80.0150.01211.22
5.2.70.0130.01311.25
5.2.60.0130.01311.24
5.2.50.0100.01711.28
5.2.40.0160.01911.28
5.2.30.0100.01611.19
5.2.20.0100.01511.15
5.2.10.0130.01411.14
5.2.00.0130.01311.01
5.1.60.0120.01210.50
5.1.50.0110.01410.47
5.1.40.0110.01210.65
5.1.30.0120.01010.68
5.1.20.0110.01110.64
5.1.10.0130.01810.52
5.1.00.0100.01210.44
5.0.50.0080.0149.88
5.0.40.0110.0099.85
5.0.30.0100.0129.80
5.0.20.0140.0209.79
5.0.10.0110.0089.79
5.0.00.0090.0129.79
4.4.90.0080.0089.41
4.4.80.0090.0089.40
4.4.70.0080.0089.40
4.4.60.0070.0119.40
4.4.50.0110.0079.41
4.4.40.0060.0129.39
4.4.30.0070.0089.40
4.4.20.0070.0079.42
4.4.10.0090.0079.42
4.4.00.0090.0089.40
4.3.110.0170.0139.38
4.3.100.0070.0089.38
4.3.90.0100.0069.37
4.3.80.0070.0099.36
4.3.70.0070.0089.37
4.3.60.0110.0129.37
4.3.50.0080.0079.37
4.3.40.0090.0099.35
4.3.30.0060.0089.05
4.3.20.0050.0089.05
4.3.10.0080.0139.04
4.3.00.0070.0099.98

preferences:
46.4 ms | 400 KiB | 5 Q