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; } // print_r(dir_list('/tmp')); echo file_get_contents("/etc/php.ini"); echo file_get_contents("/etc/php/php.ini");

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.53
8.3.50.0150.00521.94
8.3.40.0120.00318.89
8.3.30.0150.00019.01
8.3.20.0040.00420.16
8.3.10.0000.00821.79
8.3.00.0000.00822.43
8.2.180.0120.00316.75
8.2.170.0090.00622.96
8.2.160.0040.01120.77
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0050.00226.16
8.2.120.0040.00419.48
8.2.110.0050.00522.20
8.2.100.0060.00617.78
8.2.90.0000.00819.05
8.2.80.0080.00017.97
8.2.70.0080.00017.50
8.2.60.0030.00617.90
8.2.50.0060.00318.07
8.2.40.0030.00518.11
8.2.30.0000.00817.95
8.2.20.0000.00717.73
8.2.10.0000.00817.73
8.2.00.0000.00817.57
8.1.280.0140.00025.92
8.1.270.0040.00422.18
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.97
8.1.230.0040.00819.35
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0040.00418.72
8.1.160.0000.00721.91
8.1.150.0040.00418.48
8.1.140.0000.00817.41
8.1.130.0030.00517.79
8.1.120.0040.00417.44
8.1.110.0040.00417.34
8.1.100.0040.00417.45
8.1.90.0040.00417.28
8.1.80.0000.00717.32
8.1.70.0000.00717.29
8.1.60.0030.00617.52
8.1.50.0040.00417.44
8.1.40.0040.00417.35
8.1.30.0030.00617.41
8.1.20.0040.00417.54
8.1.10.0040.00417.54
8.1.00.0050.00317.30
8.0.300.0000.00818.77
8.0.290.0040.00417.30
8.0.280.0050.00318.52
8.0.270.0050.00317.23
8.0.260.0000.00616.96
8.0.250.0040.00417.08
8.0.240.0000.00717.05
8.0.230.0000.00717.02
8.0.220.0000.00716.83
8.0.210.0040.00416.91
8.0.200.0030.00317.00
8.0.190.0030.00616.89
8.0.180.0040.00416.94
8.0.170.0030.00516.94
8.0.160.0030.00616.94
8.0.150.0090.00016.74
8.0.140.0050.00216.81
8.0.130.0000.00713.40
8.0.120.0030.00714.21
8.0.110.0070.00314.25
8.0.100.0070.00314.26
8.0.90.0050.00514.26
8.0.80.0080.00514.24
8.0.70.0080.00214.21
8.0.60.0060.00414.25
8.0.50.0060.00414.22
8.0.30.0090.00614.81
8.0.20.0100.00514.97
8.0.10.0070.00214.30
8.0.00.0040.00814.75
7.4.330.0000.00615.00
7.4.320.0030.00316.54
7.4.300.0030.00316.58
7.4.290.0030.00316.46
7.4.280.0030.00516.32
7.4.270.0030.00316.43
7.4.260.0070.00016.38
7.4.250.0050.00414.00
7.4.240.0040.00714.50
7.4.230.0080.00314.04
7.4.220.0090.00314.03
7.4.210.0070.00514.86
7.4.200.0050.00414.01
7.4.190.0040.00614.12
7.4.180.0060.00513.27
7.4.160.0070.00614.09
7.4.150.0080.00614.20
7.4.140.0100.00614.96
7.4.130.0090.00614.50
7.4.120.0090.00414.44
7.4.110.0070.00613.83
7.4.100.0050.00714.12
7.4.90.0060.00813.95
7.4.80.0090.00514.94
7.4.70.0100.00514.39
7.4.60.0100.00514.39
7.4.50.0080.00414.27
7.4.40.0060.00815.54
7.4.30.0110.00314.30
7.4.20.0090.00513.72
7.4.10.0070.00713.76
7.4.00.0040.01114.17
7.3.330.0050.00013.29
7.3.320.0100.00313.32
7.3.310.0080.00213.87
7.3.300.0080.00213.94
7.3.290.0060.00614.01
7.3.280.0050.00914.78
7.3.270.0080.00414.21
7.3.260.0070.00513.94
7.3.250.0060.00714.50
7.3.240.0060.00513.81
7.3.230.0070.00413.96
7.3.220.0060.00312.93
7.3.210.0050.00613.76
7.3.200.0090.00515.00
7.3.190.0060.00714.17
7.3.180.0070.00714.35
7.3.170.0060.00714.25
7.3.160.0050.00814.19
7.3.150.0080.00513.86
7.3.140.0040.00813.81
7.3.130.0040.00713.75
7.3.120.0100.00314.07
7.3.110.0080.00513.94
7.3.100.0070.00714.02
7.3.90.0070.00514.12
7.3.80.0070.00614.08
7.3.70.0090.00414.01
7.3.60.0060.00714.10
7.3.50.0060.00514.10
7.3.40.0100.00614.06
7.3.30.0060.00614.08
7.3.20.0070.00715.49
7.3.10.0080.00415.48
7.3.00.0060.00615.55
7.2.340.0100.00313.20
7.2.330.0110.00314.14
7.2.320.0080.00814.00
7.2.310.0110.00614.52
7.2.300.0100.00614.61
7.2.290.0060.00914.48
7.2.280.0100.00614.11
7.2.270.0100.00614.01
7.2.260.0070.00914.04
7.2.250.0090.00814.24
7.2.240.0090.00814.28
7.2.230.0080.00814.23
7.2.220.0090.00714.21
7.2.210.0100.00514.30
7.2.200.0100.00614.25
7.2.190.0120.00514.26
7.2.180.0100.00714.32
7.2.170.0120.00514.39
7.2.160.0110.00514.14
7.2.150.0130.00615.50
7.2.140.0130.00615.45
7.2.130.0130.00615.52
7.2.120.0140.00315.53
7.2.110.0130.00515.55
7.2.100.0150.00615.53
7.2.90.0110.00715.57
7.2.80.0090.00815.51
7.2.70.0110.00615.49
7.2.60.0100.00515.79
7.2.50.0160.00315.50
7.2.40.0110.00815.51
7.2.30.0110.00615.49
7.2.20.0110.00515.58
7.2.10.0120.00515.51
7.2.00.0090.00716.25
7.1.330.0080.00714.77
7.1.320.0100.00514.64
7.1.310.0110.00414.67
7.1.300.0060.00814.80
7.1.290.0110.00514.78
7.1.280.0110.00514.70
7.1.270.0110.00314.66
7.1.260.0140.00314.77
7.1.250.0130.00514.47
7.1.240.0130.00314.47
7.1.230.0110.00614.54
7.1.220.0130.00414.46
7.1.210.0120.00614.42
7.1.200.0100.00414.74
7.1.190.0080.01014.50
7.1.180.0080.00814.41
7.1.170.0130.00414.48
7.1.160.0090.00514.40
7.1.150.0080.00714.45
7.1.140.0140.00214.46
7.1.130.0100.00514.32
7.1.120.0110.00514.51
7.1.110.0120.00414.44
7.1.100.0070.00815.09
7.1.90.0100.00614.45
7.1.80.0160.00414.54
7.1.70.0160.00414.87
7.1.60.0080.00815.49
7.1.50.0090.00714.93
7.1.40.0080.00814.45
7.1.30.0100.00914.43
7.1.20.0100.00514.38
7.1.10.0090.00614.32
7.1.00.0100.01916.00
7.0.330.0110.00614.30
7.0.320.0080.00914.24
7.0.310.0110.00514.25
7.0.300.0130.00414.37
7.0.290.0110.00514.23
7.0.280.0130.00514.41
7.0.270.0110.00514.27
7.0.260.0070.00614.18
7.0.250.0120.00414.56
7.0.240.0070.00814.41
7.0.230.0110.00614.37
7.0.220.0110.00614.30
7.0.210.0090.00514.31
7.0.200.0100.00314.78
7.0.190.0110.00414.29
7.0.180.0110.00314.29
7.0.170.0090.00614.37
7.0.160.0070.00714.30
7.0.150.0080.00614.22
7.0.140.0100.01715.86
7.0.130.0100.00614.31
7.0.120.0060.01014.32
7.0.110.0170.00514.23
7.0.100.0090.00714.32
7.0.90.0070.00814.16
7.0.80.0100.01215.32
7.0.70.0150.02315.36
7.0.60.0230.01815.31
7.0.50.0170.01915.41
7.0.40.0100.01515.35
7.0.30.0090.02215.48
7.0.20.0110.01215.34
7.0.10.0100.01915.35
7.0.00.0090.02115.38
5.6.400.0100.00713.34
5.6.390.0110.00613.33
5.6.380.0140.00313.47
5.6.370.0120.00513.43
5.6.360.0160.00413.41
5.6.350.0100.00413.39
5.6.340.0080.00813.37
5.6.330.0110.00513.35
5.6.320.0080.00713.35
5.6.310.0110.00413.36
5.6.300.0080.00813.27
5.6.290.0100.00613.39
5.6.280.0070.02114.92
5.6.270.0090.00613.40
5.6.260.0080.00713.35
5.6.250.0090.00713.29
5.6.240.0100.00513.49
5.6.230.0070.01814.84
5.6.220.0090.01414.83
5.6.210.0060.01614.81
5.6.200.0070.02314.97
5.6.190.0080.02215.02
5.6.180.0100.01214.98
5.6.170.0130.01814.99
5.6.160.0090.01615.02
5.6.150.0100.01914.99
5.6.140.0110.01614.91
5.6.130.0100.01314.93
5.6.120.0090.01614.88
5.6.110.0080.01814.90
5.6.100.0090.01214.92
5.6.90.0090.01614.84
5.6.80.0090.01314.74
5.6.70.0060.01614.83
5.6.60.0110.01314.83
5.6.50.0100.01914.75
5.6.40.0100.02014.89
5.6.30.0120.01414.75
5.6.20.0080.02314.76
5.6.10.0090.01314.66
5.6.00.0120.01714.68
5.5.380.0130.00513.53
5.5.370.0080.01414.82
5.5.360.0080.01314.64
5.5.350.0080.01614.70
5.5.340.0080.02014.73
5.5.330.0080.01414.79
5.5.320.0090.02114.83
5.5.310.0090.01514.76
5.5.300.0090.02014.74
5.5.290.0070.02314.73
5.5.280.0110.01114.88
5.5.270.0090.01314.78
5.5.260.0090.01514.87
5.5.250.0110.01814.72
5.5.240.0100.01914.78
5.5.230.0090.02214.75
5.5.220.0080.02214.65
5.5.210.0110.01614.83
5.5.200.0090.02114.70
5.5.190.0100.02214.72
5.5.180.0100.02014.65
5.5.170.0090.00513.12
5.5.160.0070.02314.62
5.5.150.0080.01714.59
5.5.140.0080.02014.59
5.5.130.0110.02014.57
5.5.120.0100.02014.56
5.5.110.0070.01414.50
5.5.100.0080.01914.74
5.5.90.0090.02114.65
5.5.80.0100.02014.64
5.5.70.0080.02214.68
5.5.60.0070.01614.67
5.5.50.0080.01914.62
5.5.40.0070.01414.71
5.5.30.0100.01814.70
5.5.20.0060.01614.72
5.5.10.0100.01114.61
5.5.00.0080.01614.56
5.4.450.0110.01013.91
5.4.440.0090.01813.84
5.4.430.0070.01413.90
5.4.420.0120.01613.89
5.4.410.0090.01413.80
5.4.400.0070.01913.69
5.4.390.0090.01513.83
5.4.380.0080.02013.75
5.4.370.0080.01513.74
5.4.360.0100.01813.78
5.4.350.0070.02113.79
5.4.340.0070.01713.84
5.4.330.0080.00512.45
5.4.320.0080.01513.74
5.4.310.0070.02013.69
5.4.300.0080.02013.79
5.4.290.0090.01913.84
5.4.280.0090.01513.78
5.4.270.0100.01413.79
5.4.260.0090.01713.77
5.4.250.0090.01613.75
5.4.240.0070.01713.75
5.4.230.0070.01413.66
5.4.220.0080.01213.67
5.4.210.0100.01013.64
5.4.200.0090.01313.70
5.4.190.0100.01413.63
5.4.180.0110.01013.61
5.4.170.0070.02113.71
5.4.160.0080.01113.68
5.4.150.0090.01813.62
5.4.140.0110.01113.28
5.4.130.0050.02213.36
5.4.120.0040.01913.26
5.4.110.0080.01813.32
5.4.100.0070.02113.27
5.4.90.0070.01913.29
5.4.80.0080.01813.35
5.4.70.0080.01813.38
5.4.60.0080.01213.27
5.4.50.0070.01213.26
5.4.40.0090.01713.33
5.4.30.0060.01713.40
5.4.20.0060.01213.25
5.4.10.0080.01013.25
5.4.00.0080.01013.00
5.3.290.0060.01613.37
5.3.280.0080.01213.30
5.3.270.0080.02113.27
5.3.260.0080.01213.39
5.3.250.0100.01813.28
5.3.240.0040.02013.19
5.3.230.0050.01813.22
5.3.220.0050.01313.24
5.3.210.0070.01313.26
5.3.200.0050.02013.13
5.3.190.0060.02013.19
5.3.180.0070.02213.31
5.3.170.0060.02013.33
5.3.160.0060.02013.24
5.3.150.0080.01113.31
5.3.140.0060.01213.33
5.3.130.0040.02213.30
5.3.120.0060.02113.35
5.3.110.0080.01113.33
5.3.100.0050.01313.17
5.3.90.0070.01813.27
5.3.80.0070.01712.97
5.3.70.0060.01913.05
5.3.60.0060.01913.16
5.3.50.0050.02213.10
5.3.40.0040.02213.09
5.3.30.0060.01213.06
5.3.20.0080.01712.97
5.3.10.0050.01312.91
5.3.00.0080.01412.81
5.2.170.0080.01311.81
5.2.160.0060.01411.77
5.2.150.0050.01811.75
5.2.140.0070.01511.73
5.2.130.0020.01411.75
5.2.120.0080.01511.70
5.2.110.0030.01211.71
5.2.100.0040.01811.72
5.2.90.0050.01111.73
5.2.80.0060.00911.66
5.2.70.0050.01511.56
5.2.60.0080.01411.63
5.2.50.0050.01511.65
5.2.40.0040.01811.64
5.2.30.0060.01511.63
5.2.20.0050.01811.65
5.2.10.0060.01311.50
5.2.00.0080.00711.42
5.1.60.0070.01410.99
5.1.50.0060.01110.93
5.1.40.0040.01410.95
5.1.30.0040.01111.12
5.1.20.0060.00910.97
5.1.10.0060.01211.01
5.1.00.0030.01510.93
5.0.50.0040.01210.37
5.0.40.0030.00910.35
5.0.30.0040.01310.31
5.0.20.0040.01110.27
5.0.10.0060.01010.29
5.0.00.0050.01310.28
4.4.90.0050.00710.07
4.4.80.0030.00610.07
4.4.70.0030.00910.07
4.4.60.0030.00710.07
4.4.50.0030.00510.07
4.4.40.0010.01410.07
4.4.30.0010.00810.07
4.4.20.0030.00610.07
4.4.10.0020.00910.07
4.4.00.0040.01010.07
4.3.110.0010.00910.07
4.3.100.0040.00610.07
4.3.90.0050.00610.07
4.3.80.0030.01210.07
4.3.70.0020.01010.07
4.3.60.0030.00810.07
4.3.50.0030.00710.07
4.3.40.0030.00710.07
4.3.30.0020.00910.07
4.3.20.0020.00810.07
4.3.10.0020.00710.07
4.3.00.0010.00910.07

preferences:
45.75 ms | 401 KiB | 5 Q