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( '/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.60.0040.01118.43
8.3.50.0120.00722.11
8.3.40.0120.00619.09
8.3.30.0090.00618.83
8.3.20.0050.00318.90
8.3.10.0040.00421.22
8.3.00.0100.01021.70
8.2.180.0030.01416.88
8.2.170.0110.00722.96
8.2.160.0170.00020.47
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0000.00821.05
8.2.110.0080.00420.50
8.2.100.0120.00017.85
8.2.90.0080.00019.07
8.2.80.0040.00418.05
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0030.00518.10
8.2.40.0000.00720.50
8.2.30.0080.00019.34
8.2.20.0000.00717.72
8.2.10.0040.00417.75
8.2.00.0060.00617.63
8.1.280.0120.00625.92
8.1.270.0090.00523.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00323.91
8.1.230.0080.00421.16
8.1.220.0050.00317.79
8.1.210.0030.00518.77
8.1.200.0060.00317.48
8.1.190.0030.00517.35
8.1.180.0000.00818.10
8.1.170.0000.00918.63
8.1.160.0040.00418.90
8.1.150.0040.00420.34
8.1.140.0040.00417.44
8.1.130.0000.00717.95
8.1.120.0000.00817.45
8.1.110.0000.00717.50
8.1.100.0000.00817.50
8.1.90.0000.00717.44
8.1.80.0000.00717.43
8.1.70.0050.00317.49
8.1.60.0000.00917.66
8.1.50.0020.00517.57
8.1.40.0060.00317.60
8.1.30.0060.00317.62
8.1.20.0040.00417.58
8.1.10.0070.00017.64
8.1.00.0050.00317.47
8.0.300.0040.00418.77
8.0.290.0050.00317.00
8.0.280.0040.00418.38
8.0.270.0030.00317.41
8.0.260.0030.00317.00
8.0.250.0050.00317.09
8.0.240.0000.01017.07
8.0.230.0070.00017.11
8.0.220.0070.00017.04
8.0.210.0070.00016.86
8.0.200.0040.00417.10
8.0.190.0040.00417.12
8.0.180.0000.00716.92
8.0.170.0030.00516.98
8.0.160.0080.00017.09
8.0.150.0040.00416.96
8.0.140.0070.00016.95
8.0.130.0000.00613.46
8.0.120.0090.00513.32
8.0.110.0110.00213.40
8.0.100.0090.00413.40
8.0.90.0040.00813.48
8.0.80.0090.00313.44
8.0.70.0110.00213.40
8.0.60.0070.00513.44
8.0.50.0100.00213.39
8.0.30.0110.00113.34
8.0.20.0100.00213.40
8.0.10.0090.00313.48
8.0.00.0040.00413.46
7.4.330.0000.00516.74
7.4.320.0030.00316.71
7.4.300.0030.00316.58
7.4.290.0000.00816.60
7.4.280.0060.00016.46
7.4.270.0070.00016.73
7.4.260.0030.00313.35
7.4.250.0050.00513.40
7.4.240.0070.00713.37
7.4.230.0130.00113.32
7.4.220.0090.00313.32
7.4.210.0050.00813.35
7.4.200.0050.00613.28
7.4.190.0070.00613.37
7.4.180.0100.00213.32
7.4.160.0050.00613.45
7.4.150.0080.00513.42
7.4.140.0100.00013.33
7.4.130.0090.00213.39
7.4.120.0090.00413.34
7.4.110.0100.00213.27
7.4.100.0100.00313.43
7.4.90.0050.00613.30
7.4.80.0090.00615.63
7.4.70.0120.00314.98
7.4.60.0120.00514.89
7.4.50.0070.00714.87
7.4.40.0100.00616.30
7.4.30.0120.00314.89
7.4.20.0080.00814.31
7.4.10.0080.00714.36
7.4.00.0100.00514.32
7.3.330.0030.00313.35
7.3.320.0070.00513.37
7.3.310.0090.00313.31
7.3.300.0080.00413.36
7.3.290.0100.00313.38
7.3.280.0110.00113.42
7.3.270.0070.00513.37
7.3.260.0100.00313.36
7.3.250.0120.00013.38
7.3.240.0090.00413.35
7.3.230.0100.00313.27
7.3.220.0120.00013.21
7.3.210.0100.00313.27
7.3.200.0110.00515.56
7.3.190.0100.00614.98
7.3.180.0080.00814.87
7.3.170.0100.00814.87
7.3.160.0090.00614.91
7.3.150.0070.00714.19
7.3.140.0100.00614.29
7.3.130.0110.00414.35
7.3.120.0060.00814.33
7.3.110.0100.00614.22
7.3.100.0050.01114.21
7.3.90.0040.00714.39
7.3.80.0070.00514.36
7.3.70.0060.00814.38
7.3.60.0080.00414.36
7.3.50.0130.00214.50
7.3.40.0050.00714.48
7.3.30.0080.00614.33
7.3.20.0060.01015.62
7.3.10.0100.00715.53
7.3.00.0090.00515.75
7.2.340.0110.00213.36
7.2.330.0110.00413.41
7.2.320.0110.00614.56
7.2.310.0080.01014.93
7.2.300.0110.00615.05
7.2.290.0120.00514.98
7.2.280.0130.00414.57
7.2.270.0110.00514.41
7.2.260.0100.00514.47
7.2.250.0090.00814.53
7.2.240.0100.00714.57
7.2.230.0100.00614.49
7.2.220.0090.00614.51
7.2.210.0130.00514.49
7.2.200.0140.00414.59
7.2.190.0140.00414.56
7.2.180.0110.00714.51
7.2.170.0070.00814.59
7.2.160.0110.00714.53
7.2.150.0090.00915.75
7.2.140.0120.00515.76
7.2.130.0120.00616.11
7.2.120.0080.00916.06
7.2.110.0170.00516.07
7.2.100.0110.00816.08
7.2.90.0100.00716.02
7.2.80.0110.00616.00
7.2.70.0110.00615.99
7.2.60.0110.00816.31
7.2.50.0100.00716.08
7.2.40.0110.00516.05
7.2.30.0170.00516.06
7.2.20.0110.00716.07
7.2.10.0090.01016.16
7.2.00.0120.00616.81
7.1.330.0110.00514.77
7.1.320.0120.00414.82
7.1.310.0100.00714.77
7.1.300.0100.00714.65
7.1.290.0160.00214.78
7.1.280.0110.00414.79
7.1.270.0110.00814.71
7.1.260.0150.00414.78
7.1.250.0110.00715.04
7.1.240.0140.00414.96
7.1.230.0130.00315.02
7.1.220.0070.01115.03
7.1.210.0100.00814.99
7.1.200.0090.00515.19
7.1.190.0040.01214.94
7.1.180.0060.00814.92
7.1.170.0100.00514.95
7.1.160.0130.00315.01
7.1.150.0090.00715.03
7.1.140.0100.00614.86
7.1.130.0100.00714.91
7.1.120.0070.00815.03
7.1.110.0250.00514.90
7.1.100.0080.00715.54
7.1.90.0100.00515.01
7.1.80.0110.00514.93
7.1.70.0080.00715.37
7.1.60.0120.00715.89
7.1.50.0070.01215.43
7.1.40.0080.01114.92
7.1.30.0100.00515.01
7.1.20.0110.00514.93
7.1.10.0090.00514.96
7.1.00.0080.01616.45
7.0.330.0120.00514.75
7.0.320.0100.00614.76
7.0.310.0110.00614.84
7.0.300.0110.00314.78
7.0.290.0070.00814.77
7.0.280.0100.00514.88
7.0.270.0040.01014.86
7.0.260.0080.00714.71
7.0.250.0090.00614.90
7.0.240.0100.00714.90
7.0.230.0060.00914.81
7.0.220.0060.00914.82
7.0.210.0080.00614.80
7.0.200.0130.00315.16
7.0.190.0120.00414.80
7.0.180.0070.00814.73
7.0.170.0130.00614.84
7.0.160.0100.00414.76
7.0.150.0090.00614.73
7.0.140.0090.02116.23
7.0.130.0090.00614.87
7.0.120.0070.00714.91
7.0.110.0080.00514.82
7.0.100.0130.01615.79
7.0.90.0100.01715.77
7.0.80.0100.01915.84
7.0.70.0060.01515.74
7.0.60.0090.01315.75
7.0.50.0080.02015.83
7.0.40.0100.01715.42
7.0.30.0080.01315.35
7.0.20.0110.01815.42
7.0.10.0080.02415.43
7.0.00.0150.01815.45
5.6.400.0090.00813.84
5.6.390.0120.00613.96
5.6.380.0100.00713.95
5.6.370.0060.00714.05
5.6.360.0100.00714.00
5.6.350.0090.00614.05
5.6.340.0110.00514.09
5.6.330.0100.00514.03
5.6.320.0110.00414.09
5.6.310.0090.00713.90
5.6.300.0080.00813.94
5.6.290.0070.00913.90
5.6.280.0060.02315.40
5.6.270.0080.00714.04
5.6.260.0090.00514.00
5.6.250.0090.01715.31
5.6.240.0100.01915.43
5.6.230.0090.01515.38
5.6.220.0120.01715.27
5.6.210.0130.01115.45
5.6.200.0090.01815.53
5.6.190.0090.01815.47
5.6.180.0100.01715.43
5.6.170.0090.01615.48
5.6.160.0120.02015.48
5.6.150.0090.01615.41
5.6.140.0160.02015.44
5.6.130.0110.02315.43
5.6.120.0090.01615.48
5.6.110.0120.01515.55
5.6.100.0110.01915.46
5.6.90.0100.02215.49
5.6.80.0130.01715.23
5.6.70.0110.02015.30
5.6.60.0140.01615.36
5.6.50.0120.02215.25
5.6.40.0160.01915.24
5.6.30.0090.02015.35
5.6.20.0100.02115.17
5.6.10.0110.01615.27
5.6.00.0110.01315.28
5.5.380.0060.01914.80
5.5.370.0130.01914.81
5.5.360.0110.01314.66
5.5.350.0100.01314.59
5.5.340.0110.01314.86
5.5.330.0110.01814.75
5.5.320.0090.01614.72
5.5.310.0080.02314.74
5.5.300.0110.01814.73
5.5.290.0140.01314.78
5.5.280.0080.01714.73
5.5.270.0080.01914.66
5.5.260.0130.02014.81
5.5.250.0150.01714.71
5.5.240.0150.01814.57
5.5.230.0130.01914.68
5.5.220.0130.01514.67
5.5.210.0100.01314.70
5.5.200.0150.01514.60
5.5.190.0090.02414.61
5.5.180.0120.02314.51
5.5.170.0060.01013.18
5.5.160.0140.01914.67
5.5.150.0120.02114.55
5.5.140.0130.02014.56
5.5.130.0110.02314.58
5.5.120.0130.01814.53
5.5.110.0080.02614.59
5.5.100.0130.01714.67
5.5.90.0130.01914.65
5.5.80.0120.02214.55
5.5.70.0150.01714.71
5.5.60.0120.01814.59
5.5.50.0110.02314.51
5.5.40.0130.01814.65
5.5.30.0100.01814.55
5.5.20.0110.02214.62
5.5.10.0150.01914.57
5.5.00.0150.02014.53
5.4.450.0160.02013.79
5.4.440.0110.02413.75
5.4.430.0110.02213.88
5.4.420.0100.02413.89
5.4.410.0110.02113.92
5.4.400.0130.02013.77
5.4.390.0140.01413.88
5.4.380.0090.01913.67
5.4.370.0140.02113.79
5.4.360.0140.01813.68
5.4.350.0120.02013.64
5.4.340.0120.01713.69
5.4.330.0120.00712.40
5.4.320.0130.01813.81
5.4.310.0140.02113.84
5.4.300.0160.01213.81
5.4.290.0140.02013.74
5.4.280.0150.02113.74
5.4.270.0150.01613.86
5.4.260.0130.02313.69
5.4.250.0140.02313.67
5.4.240.0170.01913.69
5.4.230.0130.02213.65
5.4.220.0140.02213.55
5.4.210.0100.01913.53
5.4.200.0170.01413.64
5.4.190.0160.01813.56
5.4.180.0170.02013.61
5.4.170.0170.01713.66
5.4.160.0130.01513.69
5.4.150.0140.01313.75
5.4.140.0110.02013.23
5.4.130.0140.01413.27
5.4.120.0120.02113.27
5.4.110.0140.01713.31
5.4.100.0110.02313.31
5.4.90.0110.02013.32
5.4.80.0150.01813.22
5.4.70.0120.02013.24
5.4.60.0110.02413.29
5.4.50.0120.02013.24
5.4.40.0100.01513.28
5.4.30.0120.02213.29
5.4.20.0120.01713.23
5.4.10.0120.01613.28
5.4.00.0140.01113.06
5.3.290.0100.02313.10
5.3.280.0130.02413.11
5.3.270.0160.02113.15
5.3.260.0160.01913.08
5.3.250.0120.01413.16
5.3.240.0120.02213.09
5.3.230.0140.01913.02
5.3.220.0160.02213.00
5.3.210.0140.02113.01
5.3.200.0110.02313.03
5.3.190.0130.02113.13
5.3.180.0160.01513.17
5.3.170.0120.01713.07
5.3.160.0120.02113.11
5.3.150.0090.02413.08
5.3.140.0120.02213.05
5.3.130.0140.01913.08
5.3.120.0100.02413.15
5.3.110.0120.02213.14
5.3.100.0110.01912.92
5.3.90.0120.01312.96
5.3.80.0120.01512.90
5.3.70.0130.02112.93
5.3.60.0110.02312.94
5.3.50.0110.02312.89
5.3.40.0130.01712.86
5.3.30.0140.02012.90
5.3.20.0120.02112.77
5.3.10.0110.01512.72
5.3.00.0140.02012.74
5.2.170.0160.01511.97
5.2.160.0120.01512.03
5.2.150.0110.01912.03
5.2.140.0120.01512.00
5.2.130.0160.01211.98
5.2.120.0090.01911.98
5.2.110.0130.01711.98
5.2.100.0140.01311.97
5.2.90.0110.01711.90
5.2.80.0100.01611.95
5.2.70.0070.01911.91
5.2.60.0120.01611.87
5.2.50.0100.01311.88
5.2.40.0110.01611.92
5.2.30.0090.01911.93
5.2.20.0120.01211.87
5.2.10.0110.01611.76
5.2.00.0110.01711.79
5.1.60.0100.01411.50
5.1.50.0080.01611.54
5.1.40.0100.01311.57
5.1.30.0100.01811.55
5.1.20.0110.01411.61
5.1.10.0100.01611.52
5.1.00.0090.01311.51
5.0.50.0070.01511.33
5.0.40.0110.01211.33
5.0.30.0090.01411.33
5.0.20.0080.01511.33
5.0.10.0100.01011.33
5.0.00.0090.01711.33
4.4.90.0060.01011.33
4.4.80.0080.00711.33
4.4.70.0060.01211.33
4.4.60.0080.01011.33
4.4.50.0070.00811.33
4.4.40.0060.01611.33
4.4.30.0070.01211.33
4.4.20.0090.01011.33
4.4.10.0100.00911.33
4.4.00.0080.01411.33
4.3.110.0050.01411.33
4.3.100.0090.00911.33
4.3.90.0070.00711.33
4.3.80.0070.01611.33
4.3.70.0090.00811.33
4.3.60.0090.01111.33
4.3.50.0080.00811.33
4.3.40.0080.01311.33
4.3.30.0050.01011.33
4.3.20.0070.01111.33
4.3.10.0060.01311.33
4.3.00.0070.01011.33

preferences:
39.01 ms | 401 KiB | 5 Q