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.0180.00418.43
8.3.50.0120.00721.99
8.3.40.0120.00318.58
8.3.30.0090.00618.72
8.3.20.0060.00318.56
8.3.10.0000.00820.96
8.3.00.0040.00423.65
8.2.180.0100.01016.63
8.2.170.0070.00722.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00021.00
8.2.110.0130.01020.35
8.2.100.0110.00017.59
8.2.90.0000.00817.63
8.2.80.0040.00718.41
8.2.70.0080.00017.63
8.2.60.0000.00817.50
8.2.50.0110.00018.05
8.2.40.0050.00218.21
8.2.30.0040.00419.68
8.2.20.0000.00817.57
8.2.10.0040.00417.59
8.2.00.0060.00317.47
8.1.280.0120.00325.92
8.1.270.0070.00023.99
8.1.260.0080.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.90
8.1.230.0080.00320.99
8.1.220.0030.00618.51
8.1.210.0050.00318.77
8.1.200.0000.00817.22
8.1.190.0050.00317.28
8.1.180.0090.00018.10
8.1.170.0000.00818.54
8.1.160.0000.00818.81
8.1.150.0030.00618.54
8.1.140.0070.00017.38
8.1.130.0070.00017.73
8.1.120.0000.00717.26
8.1.110.0040.00417.28
8.1.100.0050.00217.33
8.1.90.0000.00717.26
8.1.80.0050.00217.38
8.1.70.0030.00517.35
8.1.60.0090.00017.50
8.1.50.0030.00617.28
8.1.40.0040.00417.41
8.1.30.0000.00817.48
8.1.20.0040.00417.41
8.1.10.0030.00617.51
8.1.00.0000.00717.43
8.0.300.0060.00318.77
8.0.290.0040.00416.88
8.0.280.0030.00320.24
8.0.270.0000.00917.18
8.0.260.0000.00616.85
8.0.250.0000.00816.91
8.0.240.0070.00317.03
8.0.230.0030.00316.96
8.0.220.0030.00316.94
8.0.210.0000.00716.88
8.0.200.0040.00417.00
8.0.190.0070.00016.86
8.0.180.0000.00716.93
8.0.170.0000.00816.90
8.0.160.0000.00716.77
8.0.150.0070.00016.88
8.0.140.0070.00016.85
8.0.130.0000.00613.22
8.0.120.0050.00514.12
8.0.110.0050.00614.16
8.0.100.0080.00314.13
8.0.90.0060.00514.11
8.0.80.0070.00814.16
8.0.70.0080.00314.14
8.0.60.0050.00714.11
8.0.50.0050.00614.16
8.0.30.0100.00414.75
8.0.20.0080.00614.92
8.0.10.0050.00514.20
8.0.00.0060.00614.66
7.4.330.0000.00514.71
7.4.320.0070.00016.48
7.4.300.0030.00316.56
7.4.290.0030.00516.52
7.4.280.0080.00016.50
7.4.270.0040.00416.41
7.4.260.0000.00513.16
7.4.250.0070.00413.99
7.4.240.0070.00514.00
7.4.230.0080.00414.04
7.4.220.0090.00414.01
7.4.210.0080.00615.09
7.4.200.0040.00614.01
7.4.190.0090.00214.02
7.4.180.0050.00713.29
7.4.160.0090.00414.03
7.4.150.0070.00514.27
7.4.140.0090.00515.04
7.4.130.0080.00414.44
7.4.120.0100.00414.47
7.4.110.0080.00513.93
7.4.100.0090.00414.09
7.4.90.0070.00613.93
7.4.80.0060.00714.99
7.4.70.0100.00414.40
7.4.60.0090.00514.37
7.4.50.0090.00414.18
7.4.40.0060.00715.51
7.4.30.0090.00414.26
7.4.20.0090.00413.82
7.4.10.0100.00513.75
7.4.00.0130.00314.26
7.3.330.0050.00013.20
7.3.320.0060.00813.20
7.3.310.0070.00213.98
7.3.300.0030.00513.78
7.3.290.0050.00613.93
7.3.280.0060.00714.75
7.3.270.0060.00614.19
7.3.260.0090.00615.70
7.3.250.0090.00614.50
7.3.240.0060.00613.97
7.3.230.0060.00613.99
7.3.220.0050.00513.06
7.3.210.0050.00813.88
7.3.200.0080.00614.98
7.3.190.0080.00414.38
7.3.180.0060.00614.37
7.3.170.0080.00614.38
7.3.160.0040.00714.36
7.3.150.0040.00713.82
7.3.140.0070.00513.88
7.3.130.0080.00513.86
7.3.120.0080.00614.19
7.3.110.0080.00413.97
7.3.100.0080.00413.93
7.3.90.0060.00714.12
7.3.80.0080.00413.97
7.3.70.0070.00314.17
7.3.60.0050.00713.99
7.3.50.0060.00414.02
7.3.40.0060.00614.19
7.3.30.0030.00714.11
7.3.20.0070.00715.18
7.3.10.0060.00715.00
7.3.00.0100.00315.07
7.2.340.0080.00413.31
7.2.330.0080.00714.09
7.2.320.0120.00314.00
7.2.310.0090.00614.53
7.2.300.0110.00414.50
7.2.290.0090.00614.61
7.2.280.0090.00613.94
7.2.270.0140.00214.06
7.2.260.0090.00614.06
7.2.250.0090.00614.23
7.2.240.0080.00714.22
7.2.230.0120.00214.30
7.2.220.0070.00814.24
7.2.210.0060.00814.24
7.2.200.0100.00514.28
7.2.190.0110.00614.21
7.2.180.0090.00414.31
7.2.170.0110.00514.34
7.2.160.0100.00514.17
7.2.150.0130.00614.96
7.2.140.0060.00915.03
7.2.130.0100.00515.04
7.2.120.0130.00315.11
7.2.110.0100.00415.15
7.2.100.0100.00715.12
7.2.90.0140.00214.99
7.2.80.0100.00515.05
7.2.70.0100.00515.07
7.2.60.0090.00715.03
7.2.50.0090.00614.99
7.2.40.0110.00415.00
7.2.30.0090.00615.04
7.2.20.0100.00715.09
7.2.10.0100.00515.16
7.2.00.0090.00716.01
7.1.330.0080.00514.44
7.1.320.0090.00514.31
7.1.310.0050.00814.44
7.1.300.0060.00614.41
7.1.290.0100.00414.37
7.1.280.0080.00714.36
7.1.270.0090.00514.27
7.1.260.0070.00714.24
7.1.250.0090.00514.10
7.1.240.0090.00513.93
7.1.230.0070.00714.09
7.1.220.0070.00614.09
7.1.210.0120.00314.01
7.1.200.0070.00614.36
7.1.190.0100.00414.01
7.1.180.0090.00514.01
7.1.170.0100.00413.94
7.1.160.0130.00214.07
7.1.150.0070.00714.02
7.1.140.0080.00613.97
7.1.130.0110.00413.97
7.1.120.0060.00814.01
7.1.110.0100.00513.95
7.1.100.0100.00814.73
7.1.90.0080.00813.91
7.1.80.0100.00513.99
7.1.70.0060.00614.45
7.1.60.0120.00215.11
7.1.50.0080.00814.58
7.1.40.0080.00613.95
7.1.30.0080.00613.97
7.1.20.0070.00813.99
7.1.10.0110.00214.00
7.1.00.0060.01415.64
7.0.330.0080.00613.89
7.0.320.0090.00513.96
7.0.310.0090.00513.85
7.0.300.0110.00413.78
7.0.290.0090.00513.82
7.0.280.0120.00113.81
7.0.270.0150.00213.85
7.0.260.0080.00513.86
7.0.250.0100.00413.90
7.0.240.0090.00513.93
7.0.230.0110.00313.96
7.0.220.0140.00613.92
7.0.210.0080.00514.01
7.0.200.0090.00314.50
7.0.190.0110.00413.92
7.0.180.0110.00513.92
7.0.170.0110.00213.91
7.0.160.0090.00513.91
7.0.150.0130.00313.90
7.0.140.0070.01915.43
7.0.130.0100.00613.90
7.0.120.0090.00513.84
7.0.110.0140.00613.88
7.0.100.0120.02015.14
7.0.90.0130.02015.00
7.0.80.0100.01415.02
7.0.70.0160.01515.11
7.0.60.0070.01615.07
7.0.50.0120.01315.09
7.0.40.0090.01415.07
7.0.30.0120.01515.07
7.0.20.0100.01215.05
7.0.10.0080.01415.04
7.0.00.0130.01315.00
5.6.400.0090.00413.39
5.6.390.0050.00813.41
5.6.380.0100.00513.44
5.6.370.0070.00613.38
5.6.360.0090.00513.40
5.6.350.0100.00413.35
5.6.340.0060.00813.47
5.6.330.0060.00913.36
5.6.320.0080.00613.46
5.6.310.0100.00513.43
5.6.300.0100.00513.25
5.6.290.0100.00413.46
5.6.280.0060.02115.00
5.6.270.0090.00613.34
5.6.260.0090.00613.50
5.6.250.0120.01114.76
5.6.240.0050.02314.85
5.6.230.0090.02214.95
5.6.220.0090.02214.81
5.6.210.0070.01714.85
5.6.200.0110.02014.95
5.6.190.0100.01914.94
5.6.180.0090.01714.92
5.6.170.0130.00914.84
5.6.160.0100.01214.92
5.6.150.0090.01414.95
5.6.140.0070.01614.88
5.6.130.0070.01414.92
5.6.120.0100.02114.96
5.6.110.0100.02014.95
5.6.100.0100.01114.86
5.6.90.0070.01914.82
5.6.80.0110.01114.72
5.6.70.0080.01814.84
5.6.60.0070.01614.76
5.6.50.0090.01414.81
5.6.40.0100.01214.79
5.6.30.0110.01114.69
5.6.20.0090.01314.69
5.6.10.0110.01414.68
5.6.00.0110.01514.66
5.5.380.0100.01414.80
5.5.370.0080.02314.80
5.5.360.0130.01214.69
5.5.350.0080.02014.74
5.5.340.0100.02014.83
5.5.330.0100.01914.81
5.5.320.0120.01114.85
5.5.310.0090.01414.89
5.5.300.0070.01514.80
5.5.290.0120.01114.74
5.5.280.0050.01714.76
5.5.270.0090.01314.73
5.5.260.0110.01814.82
5.5.250.0060.01414.79
5.5.240.0110.01114.70
5.5.230.0060.02014.72
5.5.220.0080.01614.67
5.5.210.0070.01514.69
5.5.200.0080.01314.58
5.5.190.0080.01414.67
5.5.180.0090.01314.71
5.5.170.0120.00413.21
5.5.160.0080.01214.61
5.5.150.0080.01214.57
5.5.140.0120.01214.66
5.5.130.0050.01514.60
5.5.120.0090.01214.48
5.5.110.0080.01414.53
5.5.100.0130.01314.65
5.5.90.0080.01514.63
5.5.80.0080.01114.58
5.5.70.0070.01214.69
5.5.60.0070.01214.64
5.5.50.0090.01114.68
5.5.40.0100.01814.64
5.5.30.0070.02014.69
5.5.20.0100.01814.69
5.5.10.0110.02014.56
5.5.00.0080.02214.55
5.4.450.0080.01213.85
5.4.440.0080.01413.92
5.4.430.0070.01313.78
5.4.420.0060.01313.91
5.4.410.0100.00813.76
5.4.400.0090.01113.80
5.4.390.0100.01013.71
5.4.380.0090.01013.75
5.4.370.0090.01113.75
5.4.360.0110.01513.71
5.4.350.0080.01213.86
5.4.340.0070.01113.73
5.4.330.0110.00212.42
5.4.320.0060.02213.83
5.4.310.0070.01213.80
5.4.300.0090.00913.79
5.4.290.0070.01113.68
5.4.280.0080.01213.77
5.4.270.0090.01013.79
5.4.260.0060.01213.77
5.4.250.0070.01113.80
5.4.240.0070.01013.79
5.4.230.0060.01213.61
5.4.220.0080.01313.62
5.4.210.0070.01213.65
5.4.200.0090.01413.71
5.4.190.0070.02013.68
5.4.180.0100.01713.69
5.4.170.0090.01713.69
5.4.160.0080.02013.66
5.4.150.0070.01913.67
5.4.140.0070.01613.33
5.4.130.0060.01913.31
5.4.120.0060.01913.24
5.4.110.0080.01813.31
5.4.100.0060.01813.32
5.4.90.0110.01513.33
5.4.80.0070.01813.32
5.4.70.0070.01813.27
5.4.60.0090.01913.36
5.4.50.0070.01713.30
5.4.40.0080.01913.29
5.4.30.0070.01813.33
5.4.20.0070.01713.42
5.4.10.0090.01813.34
5.4.00.0080.01813.01
5.3.290.0080.01413.36
5.3.280.0080.01613.28
5.3.270.0090.01213.36
5.3.260.0080.01813.35
5.3.250.0070.01513.40
5.3.240.0080.01513.31
5.3.230.0080.01713.19
5.3.220.0070.01813.12
5.3.210.0070.02013.18
5.3.200.0100.00913.11
5.3.190.0080.02013.19
5.3.180.0070.01813.26
5.3.170.0060.01513.22
5.3.160.0070.02213.23
5.3.150.0090.01713.33
5.3.140.0080.01913.20
5.3.130.0090.01413.29
5.3.120.0100.01413.21
5.3.110.0110.01213.25
5.3.100.0070.01513.08
5.3.90.0060.01913.03
5.3.80.0040.02012.98
5.3.70.0070.01813.04
5.3.60.0060.02013.16
5.3.50.0050.02113.02
5.3.40.0100.01713.07
5.3.30.0100.01613.03
5.3.20.0070.01512.96
5.3.10.0100.01312.90
5.3.00.0070.01112.84
5.2.170.0070.01311.77
5.2.160.0050.01211.80
5.2.150.0050.01811.79
5.2.140.0070.01611.72
5.2.130.0060.01511.75
5.2.120.0060.01611.76
5.2.110.0060.01711.71
5.2.100.0060.01811.72
5.2.90.0070.01311.72
5.2.80.0070.01011.59
5.2.70.0040.02011.65
5.2.60.0050.01511.59
5.2.50.0050.01511.60
5.2.40.0070.01411.67
5.2.30.0040.01611.60
5.2.20.0050.01611.60
5.2.10.0050.01511.50
5.2.00.0040.01211.41
5.1.60.0060.00910.78
5.1.50.0060.01310.88
5.1.40.0040.01111.00
5.1.30.0040.01611.06
5.1.20.0050.01510.94
5.1.10.0060.01211.04
5.1.00.0060.01310.81
5.0.50.0040.00810.50
5.0.40.0070.00810.50
5.0.30.0050.01610.50
5.0.20.0060.01010.50
5.0.10.0060.00910.50
5.0.00.0030.01510.50
4.4.90.0010.00610.50
4.4.80.0040.00710.50
4.4.70.0010.00910.50
4.4.60.0030.00710.50
4.4.50.0030.00810.50
4.4.40.0040.00910.50
4.4.30.0030.00610.50
4.4.20.0030.00910.50
4.4.10.0030.00710.50
4.4.00.0010.01410.50
4.3.110.0020.00910.50
4.3.100.0010.00910.50
4.3.90.0030.00810.50
4.3.80.0040.01110.50
4.3.70.0020.00910.50
4.3.60.0040.00810.50
4.3.50.0040.00710.50
4.3.40.0030.01210.50
4.3.30.0030.00810.50
4.3.20.0010.00710.50
4.3.10.0010.00510.50
4.3.00.0010.00510.50

preferences:
58.6 ms | 401 KiB | 5 Q