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 file_get_contents( $filename.'/cmdline' ); $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.70.0190.00018.43
8.3.60.0110.01118.33
8.3.50.0100.01221.14
8.3.40.0130.00618.88
8.3.30.0130.00318.96
8.3.20.0040.00418.85
8.3.10.0060.00321.05
8.3.00.0000.00723.48
8.2.180.0090.00618.54
8.2.170.0140.00022.96
8.2.160.0030.01022.12
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00019.66
8.2.110.0070.00320.54
8.2.100.0060.00618.03
8.2.90.0030.00619.03
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0040.00418.04
8.2.50.0080.00018.07
8.2.40.0040.00418.16
8.2.30.0040.00421.16
8.2.20.0000.00817.61
8.2.10.0040.00417.76
8.2.00.0060.00317.63
8.1.280.0100.01025.92
8.1.270.0070.00023.99
8.1.260.0140.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.45
8.1.230.0040.00721.05
8.1.220.0040.00418.77
8.1.210.0040.00419.16
8.1.200.0070.00317.48
8.1.190.0030.00517.55
8.1.180.0000.00918.10
8.1.170.0040.00418.79
8.1.160.0000.00718.95
8.1.150.0040.00418.75
8.1.140.0050.00317.51
8.1.130.0030.00317.77
8.1.120.0080.00017.52
8.1.110.0000.01017.45
8.1.100.0090.00017.44
8.1.90.0040.00417.39
8.1.80.0040.00417.48
8.1.70.0070.00017.50
8.1.60.0020.00517.50
8.1.50.0040.00417.55
8.1.40.0040.00417.47
8.1.30.0030.00617.64
8.1.20.0030.00517.63
8.1.10.0040.00417.59
8.1.00.0040.00417.61
8.0.300.0040.00420.01
8.0.290.0000.00717.16
8.0.280.0000.00718.57
8.0.270.0040.00417.20
8.0.260.0040.00416.87
8.0.250.0040.00416.96
8.0.240.0000.00817.08
8.0.230.0000.00717.06
8.0.220.0070.00316.89
8.0.210.0000.00716.89
8.0.200.0030.00316.98
8.0.190.0050.00217.09
8.0.180.0000.00716.92
8.0.170.0000.00717.04
8.0.160.0070.00017.04
8.0.150.0040.00416.96
8.0.140.0000.00816.98
8.0.130.0030.00613.42
8.0.120.0090.00113.44
8.0.110.0070.00413.39
8.0.100.0100.00313.43
8.0.90.0060.00613.46
8.0.80.0080.00513.42
8.0.70.0080.00513.46
8.0.60.0090.00313.43
8.0.50.0080.00513.46
8.0.30.0100.00213.35
8.0.20.0100.00013.43
8.0.10.0070.00413.49
8.0.00.0030.00313.52
7.4.330.0000.00514.84
7.4.320.0030.00316.64
7.4.300.0000.00616.56
7.4.290.0000.00716.58
7.4.280.0000.00716.69
7.4.270.0070.00016.64
7.4.260.0030.00313.38
7.4.250.0080.00313.34
7.4.240.0100.00313.36
7.4.230.0120.00313.32
7.4.220.0040.00813.31
7.4.210.0060.00613.32
7.4.200.0060.00713.35
7.4.190.0090.00413.41
7.4.180.0060.00713.40
7.4.160.0100.00213.38
7.4.150.0080.00413.31
7.4.140.0110.00113.37
7.4.130.0080.00413.34
7.4.120.0070.00313.24
7.4.110.0060.00413.19
7.4.100.0080.00213.30
7.4.90.0100.00313.33
7.4.80.0080.00715.62
7.4.70.0080.00914.91
7.4.60.0060.01014.88
7.4.50.0090.00414.80
7.4.40.0100.00516.13
7.4.30.0060.00714.70
7.4.20.0040.01114.25
7.4.10.0110.00414.08
7.4.00.0090.00714.38
7.3.330.0060.00013.34
7.3.320.0040.00713.38
7.3.310.0050.00513.29
7.3.300.0020.00613.36
7.3.290.0040.00413.38
7.3.280.0060.00313.32
7.3.270.0090.00413.39
7.3.260.0080.00613.40
7.3.250.0080.00513.35
7.3.240.0080.00313.13
7.3.230.0080.00313.40
7.3.220.0080.00313.18
7.3.210.0090.00213.37
7.3.200.0110.00415.51
7.3.190.0060.01014.77
7.3.180.0080.00614.85
7.3.170.0070.00814.73
7.3.160.0040.01014.68
7.3.150.0060.00614.09
7.3.140.0100.00514.27
7.3.130.0070.00814.20
7.3.120.0080.00514.38
7.3.110.0090.00514.17
7.3.100.0110.00414.19
7.3.90.0120.00314.39
7.3.80.0140.00314.29
7.3.70.0090.00814.36
7.3.60.0110.00414.24
7.3.50.0050.00714.42
7.3.40.0080.00414.43
7.3.30.0070.00514.43
7.3.20.0160.00715.58
7.3.10.0050.00715.89
7.3.00.0070.00615.82
7.2.340.0080.00413.57
7.2.330.0090.00413.56
7.2.320.0120.00514.43
7.2.310.0100.00714.89
7.2.300.0100.00515.01
7.2.290.0080.00815.03
7.2.280.0090.00814.45
7.2.270.0110.00714.55
7.2.260.0090.00714.51
7.2.250.0090.00814.48
7.2.240.0140.00314.49
7.2.230.0070.00814.44
7.2.220.0080.00814.45
7.2.210.0100.00614.46
7.2.200.0100.00714.61
7.2.190.0100.00714.48
7.2.180.0120.00514.51
7.2.170.0100.00414.55
7.2.160.0110.00614.55
7.2.150.0110.00515.81
7.2.140.0100.00415.63
7.2.130.0090.00616.15
7.2.120.0110.00616.06
7.2.110.0120.00316.03
7.2.100.0090.00516.10
7.2.90.0080.00816.10
7.2.80.0110.00516.03
7.2.70.0080.00916.02
7.2.60.0080.00816.18
7.2.50.0070.00716.05
7.2.40.0080.00816.11
7.2.30.0110.00616.04
7.2.20.0080.00916.08
7.2.10.0070.00816.11
7.2.00.0120.00316.86
7.1.330.0100.00614.73
7.1.320.0100.00614.69
7.1.310.0090.00714.78
7.1.300.0090.00814.70
7.1.290.0060.01014.79
7.1.280.0100.00514.66
7.1.270.0090.00814.68
7.1.260.0090.00514.66
7.1.250.0090.00415.04
7.1.240.0090.00614.56
7.1.230.0110.00614.77
7.1.220.0080.00614.76
7.1.210.0090.00514.68
7.1.200.0070.00715.00
7.1.190.0080.00714.77
7.1.180.0070.00614.72
7.1.170.0100.00314.66
7.1.160.0080.00714.70
7.1.150.0070.00814.70
7.1.140.0100.00514.61
7.1.130.0090.00614.67
7.1.120.0100.00514.71
7.1.110.0090.00614.78
7.1.100.0100.00515.55
7.1.90.0090.00514.70
7.1.80.0100.00514.63
7.1.70.0100.00815.35
7.1.60.0170.00815.92
7.1.50.0130.00515.28
7.1.40.0090.00814.78
7.1.30.0090.00714.79
7.1.20.0090.00714.63
7.1.10.0130.00414.61
7.1.00.0100.00714.77
7.0.330.0090.00614.58
7.0.320.0120.00314.52
7.0.310.0090.00514.57
7.0.300.0080.00614.55
7.0.290.0070.00714.54
7.0.280.0080.00514.68
7.0.270.0070.00914.52
7.0.260.0080.00714.56
7.0.250.0160.00714.70
7.0.240.0060.00814.55
7.0.230.0070.00814.60
7.0.220.0070.00814.52
7.0.210.0090.00514.55
7.0.200.0080.00515.18
7.0.190.0080.00714.60
7.0.180.0090.00714.62
7.0.170.0110.00514.54
7.0.160.0130.00314.51
7.0.150.0110.00614.59
7.0.140.0090.00614.54
7.0.130.0060.00814.57
7.0.120.0120.00214.63
7.0.110.0130.00514.45
7.0.100.0110.00314.52
7.0.90.0120.00314.47
7.0.80.0110.00514.54
7.0.70.0110.00414.53
7.0.60.0120.00214.57
7.0.50.0070.00914.41
7.0.40.0080.00814.59
7.0.30.0100.00614.48
7.0.20.0080.00514.49
7.0.10.0080.00614.52
7.0.00.0070.00714.44
5.6.400.0090.00613.86
5.6.390.0130.00313.91
5.6.380.0080.00813.95
5.6.370.0090.00513.76
5.6.360.0100.00513.74
5.6.350.0090.00613.80
5.6.340.0110.00713.91
5.6.330.0090.00513.80
5.6.320.0090.00813.85
5.6.310.0060.01013.97
5.6.300.0090.00713.82
5.6.290.0110.00613.87
5.6.280.0120.00413.84
5.6.270.0120.00613.81
5.6.260.0100.00513.93
5.6.250.0080.00613.86
5.6.240.0120.00614.03
5.6.230.0070.00813.91
5.6.220.0090.00713.97
5.6.210.0090.00714.09
5.6.200.0070.01014.08
5.6.190.0100.00513.91
5.6.180.0120.00514.13
5.6.170.0120.00313.96
5.6.160.0100.00714.06
5.6.150.0110.00613.87
5.6.140.0080.00714.00
5.6.130.0110.00413.87
5.6.120.0090.00913.86
5.6.110.0110.00613.89
5.6.100.0110.00413.93
5.6.90.0070.00713.84
5.6.80.0090.00613.75
5.6.70.0070.00913.88
5.6.60.0060.00913.87
5.6.50.0100.00413.80
5.6.40.0110.00414.00
5.6.30.0100.00413.73
5.6.20.0080.00713.95
5.6.10.0100.00413.77
5.6.00.0090.00813.82
5.5.380.0100.00513.99
5.5.370.0070.00914.01
5.5.360.0110.00313.84
5.5.350.0090.00713.76
5.5.340.0120.00413.91
5.5.330.0120.00413.80
5.5.320.0110.00513.88
5.5.310.0110.00513.83
5.5.300.0090.00613.71
5.5.290.0100.00513.88
5.5.280.0060.01113.87
5.5.270.0100.00513.76
5.5.260.0080.00713.73
5.5.250.0090.00613.83
5.5.240.0090.00713.86
5.5.230.0080.00713.95
5.5.220.0100.00513.87
5.5.210.0080.00713.91
5.5.200.0080.00613.77
5.5.190.0080.00713.90
5.5.180.0090.00513.69
5.5.170.0090.00713.88
5.5.160.0100.00413.78
5.5.150.0110.00513.75
5.5.140.0080.00613.75
5.5.130.0090.00613.66
5.5.120.0090.00613.68
5.5.110.0080.00813.62
5.5.100.0050.00913.78
5.5.90.0100.00713.77
5.5.80.0080.00713.84
5.5.70.0050.01013.94
5.5.60.0090.00613.75
5.5.50.0110.00513.86
5.5.40.0090.00713.72
5.5.30.0080.00613.71
5.5.20.0090.00613.85
5.5.10.0110.00513.75
5.5.00.0120.00213.83
5.4.450.0090.00912.80
5.4.440.0100.00912.69
5.4.430.0090.00712.67
5.4.420.0120.00512.65
5.4.410.0090.00812.77
5.4.400.0140.00312.72
5.4.390.0100.01112.82
5.4.380.0090.00912.78
5.4.370.0090.00812.82
5.4.360.0120.00612.73
5.4.350.0090.00812.77
5.4.340.0110.00612.63
5.4.330.0130.00512.86
5.4.320.0090.00912.86
5.4.310.0090.00812.79
5.4.300.0120.00812.72
5.4.290.0130.00812.90
5.4.280.0100.00912.67
5.4.270.0110.00612.90
5.4.260.0080.00912.78
5.4.250.0100.00812.69
5.4.240.0100.00712.67
5.4.230.0160.00812.59
5.4.220.0130.00512.63
5.4.210.0110.00912.56
5.4.200.0140.00512.63
5.4.190.0120.00612.54
5.4.180.0110.00712.59
5.4.170.0100.01812.49
5.4.160.0170.01312.61
5.4.150.0160.02812.64
5.4.140.0130.01912.64
5.4.130.0120.01912.65
5.4.120.0170.01712.65
5.4.110.0140.01612.64
5.4.100.0130.01812.69
5.4.90.0160.01312.60
5.4.80.0140.01512.60
5.4.70.0130.01512.75
5.4.60.0100.01912.70
5.4.50.0120.01612.64
5.4.40.0140.01412.59
5.4.30.0090.01812.59
5.4.20.0190.02412.67
5.4.10.0150.01512.59
5.4.00.0130.01512.45
5.3.290.0090.01013.21
5.3.280.0070.01013.06
5.3.270.0140.01713.09
5.3.260.0180.01413.20
5.3.250.0110.01813.18
5.3.240.0130.02013.04
5.3.230.0150.01813.12
5.3.220.0190.02212.92
5.3.210.0110.01913.06
5.3.200.0140.01712.91
5.3.190.0140.01712.93
5.3.180.0120.01613.15
5.3.170.0130.01813.13
5.3.160.0140.03013.05
5.3.150.0160.01413.14
5.3.140.0120.01713.13
5.3.130.0150.02412.99
5.3.120.0120.01712.95
5.3.110.0120.01813.03
5.3.100.0110.01912.90
5.3.90.0150.02212.96
5.3.80.0150.02912.80
5.3.70.0130.01512.84
5.3.60.0120.01712.83
5.3.50.0110.01712.85
5.3.40.0160.01612.89
5.3.30.0150.01512.87
5.3.20.0140.01412.78
5.3.10.0100.01812.67
5.3.00.0110.00712.86

preferences:
70.06 ms | 401 KiB | 5 Q