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('/etc/php5')); // echo file_get_contents("/etc/php.ini"); // echo file_get_contents("/proc/version");

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.0080.00818.31
8.3.50.0090.00621.27
8.3.40.0070.01118.92
8.3.30.0110.00418.89
8.3.20.0000.00818.78
8.3.10.0050.00321.23
8.3.00.0050.00321.91
8.2.180.0120.00916.75
8.2.170.0120.00622.96
8.2.160.0080.00520.36
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00521.18
8.2.110.0070.00320.35
8.2.100.0080.00317.72
8.2.90.0070.00019.22
8.2.80.0040.00417.97
8.2.70.0000.00817.50
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0080.00018.16
8.2.30.0000.00721.28
8.2.20.0070.00017.75
8.2.10.0040.00417.77
8.2.00.0040.00417.78
8.1.280.0100.00725.92
8.1.270.0050.00323.99
8.1.260.0030.00626.35
8.1.250.0050.00328.09
8.1.240.0090.00023.88
8.1.230.0000.01420.96
8.1.220.0050.00318.77
8.1.210.0080.00418.98
8.1.200.0000.01117.35
8.1.190.0000.00717.65
8.1.180.0080.00018.10
8.1.170.0030.00618.57
8.1.160.0000.00818.98
8.1.150.0000.00718.59
8.1.140.0000.00917.54
8.1.130.0000.00717.80
8.1.120.0040.00417.54
8.1.110.0050.00217.39
8.1.100.0000.00717.51
8.1.90.0060.00317.53
8.1.80.0000.00817.57
8.1.70.0000.00817.50
8.1.60.0030.00617.59
8.1.50.0000.00817.48
8.1.40.0040.00417.50
8.1.30.0040.00417.77
8.1.20.0000.00917.73
8.1.10.0000.00717.64
8.1.00.0000.00917.41
8.0.300.0000.00719.99
8.0.290.0050.00217.30
8.0.280.0030.00318.34
8.0.270.0000.00716.86
8.0.260.0000.00716.87
8.0.250.0000.00717.00
8.0.240.0040.00416.93
8.0.230.0000.00717.00
8.0.220.0050.00316.89
8.0.210.0000.00716.93
8.0.200.0000.01017.01
8.0.190.0040.00417.02
8.0.180.0040.00416.79
8.0.170.0040.00417.00
8.0.160.0000.00716.89
8.0.150.0000.00716.79
8.0.140.0000.00816.84
8.0.130.0030.00313.43
8.0.120.0020.00914.12
8.0.110.0050.00514.15
8.0.100.0080.00214.05
8.0.90.0070.00314.19
8.0.80.0110.00314.27
8.0.70.0080.00314.30
8.0.60.0080.00314.22
8.0.50.0060.00614.23
8.0.30.0100.00414.75
8.0.20.0110.00715.01
8.0.10.0080.00414.29
8.0.00.0050.00714.76
7.4.330.0060.00016.71
7.4.320.0000.00616.54
7.4.300.0060.00016.64
7.4.290.0000.00716.64
7.4.280.0030.00516.54
7.4.270.0050.00316.64
7.4.260.0030.00313.30
7.4.250.0060.00314.01
7.4.240.0040.00614.04
7.4.230.0030.00714.11
7.4.220.0070.00414.09
7.4.210.0060.00715.11
7.4.200.0080.00114.02
7.4.190.0060.00314.14
7.4.180.0070.00313.22
7.4.160.0070.00314.11
7.4.150.0070.00514.25
7.4.140.0080.00715.04
7.4.130.0090.00414.46
7.4.120.0090.00414.50
7.4.110.0060.00614.01
7.4.100.0090.00414.10
7.4.90.0030.00714.01
7.4.80.0060.00715.05
7.4.70.0090.00514.48
7.4.60.0100.00514.48
7.4.50.0080.00614.41
7.4.40.0090.00615.61
7.4.30.0060.00914.46
7.4.20.0080.00713.94
7.4.10.0080.00814.14
7.4.00.0080.00814.37
7.3.330.0030.00213.20
7.3.320.0060.00413.23
7.3.310.0060.00513.98
7.3.300.0050.00514.00
7.3.290.0080.00413.94
7.3.280.0060.00814.76
7.3.270.0100.00314.21
7.3.260.0120.00615.71
7.3.250.0060.00814.53
7.3.240.0090.00414.06
7.3.230.0060.00714.00
7.3.220.0090.00213.04
7.3.210.0100.00414.01
7.3.200.0070.00615.01
7.3.190.0110.00514.48
7.3.180.0090.00714.43
7.3.170.0120.00414.47
7.3.160.0120.00414.53
7.3.150.0090.00613.91
7.3.140.0100.00413.88
7.3.130.0080.00714.13
7.3.120.0060.00814.19
7.3.110.0100.00514.18
7.3.100.0060.00713.99
7.3.90.0080.00614.30
7.3.80.0080.00414.18
7.3.70.0080.00514.24
7.3.60.0070.00614.23
7.3.50.0080.00614.28
7.3.40.0110.00314.14
7.3.30.0090.00414.22
7.3.20.0100.00415.64
7.3.10.0090.00415.52
7.3.00.0110.00315.57
7.2.340.0100.00313.34
7.2.330.0120.00514.19
7.2.320.0090.00614.27
7.2.310.0110.00514.67
7.2.300.0120.00614.67
7.2.290.0100.00714.64
7.2.280.0100.00514.24
7.2.270.0100.00714.23
7.2.260.0080.00714.32
7.2.250.0100.00514.35
7.2.240.0090.00714.42
7.2.230.0070.00914.33
7.2.220.0070.00614.44
7.2.210.0080.00614.27
7.2.200.0100.00414.38
7.2.190.0080.00614.36
7.2.180.0070.00814.36
7.2.170.0070.00814.47
7.2.160.0120.00314.51
7.2.150.0120.00515.94
7.2.140.0110.00515.89
7.2.130.0080.00815.99
7.2.120.0130.00615.88
7.2.110.0100.00515.93
7.2.100.0100.00615.96
7.2.90.0100.00715.91
7.2.80.0070.00915.82
7.2.70.0120.00415.86
7.2.60.0070.00715.95
7.2.50.0110.00415.92
7.2.40.0090.00615.89
7.2.30.0060.01015.88
7.2.20.0120.00415.96
7.2.10.0110.00515.92
7.2.00.0090.00615.90
7.1.330.0070.00714.96
7.1.320.0080.00614.91
7.1.310.0050.00814.94
7.1.300.0100.00514.88
7.1.290.0070.00714.89
7.1.280.0080.00514.82
7.1.270.0080.00514.84
7.1.260.0080.00714.89
7.1.250.0100.00514.83
7.1.240.0080.00814.84
7.1.230.0090.00714.85
7.1.220.0050.00914.89
7.1.210.0090.00614.91
7.1.200.0060.00714.85
7.1.190.0100.00514.87
7.1.180.0090.00514.88
7.1.170.0090.00614.79
7.1.160.0100.00614.78
7.1.150.0100.00414.87
7.1.140.0080.00614.82
7.1.130.0100.00414.88
7.1.120.0100.00514.73
7.1.110.0120.00514.81
7.1.100.0090.00514.79
7.1.90.0090.00514.81
7.1.80.0080.00714.85
7.1.70.0080.00615.15
7.1.60.0140.00515.58
7.1.50.0090.00915.09
7.1.40.0130.00414.84
7.1.30.0080.00814.98
7.1.20.0090.00614.80
7.1.10.0130.00414.85
7.1.00.0080.01116.07
7.0.330.0080.00714.62
7.0.320.0090.00514.59
7.0.310.0070.00614.54
7.0.300.0060.00714.63
7.0.290.0080.00614.56
7.0.280.0070.00614.62
7.0.270.0080.00614.56
7.0.260.0100.00514.68
7.0.250.0080.00814.70
7.0.240.0080.00514.74
7.0.230.0070.00714.59
7.0.220.0090.00614.62
7.0.210.0100.00514.64
7.0.200.0100.00714.94
7.0.190.0090.00714.71
7.0.180.0090.00514.77
7.0.170.0100.00614.71
7.0.160.0100.00714.70
7.0.150.0090.00714.60
7.0.140.0080.01715.78
7.0.130.0130.00314.64
7.0.120.0060.00714.74
7.0.110.0070.00914.62
7.0.100.0070.00614.68
7.0.90.0070.00714.57
7.0.80.0110.01715.48
7.0.70.0120.01515.49
7.0.60.0110.01615.50
7.0.50.0070.02015.55
7.0.40.0080.01215.18
7.0.30.0070.02115.24
7.0.20.0090.01115.24
7.0.10.0080.02015.22
7.0.00.0070.01915.18
5.6.400.0100.00613.63
5.6.390.0100.00513.56
5.6.380.0060.00813.75
5.6.370.0080.00713.55
5.6.360.0060.00713.66
5.6.350.0090.00513.72
5.6.340.0080.00613.76
5.6.330.0100.00513.61
5.6.320.0050.00813.67
5.6.310.0100.00513.64
5.6.300.0070.00913.61
5.6.290.0100.00513.71
5.6.280.0070.01714.93
5.6.270.0090.00613.65
5.6.260.0110.00413.69
5.6.250.0070.00613.63
5.6.240.0070.00613.75
5.6.230.0070.02114.94
5.6.220.0090.01814.92
5.6.210.0050.01514.96
5.6.200.0110.01815.00
5.6.190.0090.01415.05
5.6.180.0080.01914.93
5.6.170.0100.01714.96
5.6.160.0120.01414.93
5.6.150.0120.01615.03
5.6.140.0100.01614.96
5.6.130.0080.01514.92
5.6.120.0080.01914.91
5.6.110.0070.01814.85
5.6.100.0090.01414.92
5.6.90.0110.01714.82
5.6.80.0090.01114.74
5.6.70.0090.01314.82
5.6.60.0060.01914.86
5.6.50.0050.01514.76
5.6.40.0100.01514.83
5.6.30.0090.01314.73
5.6.20.0110.01714.78
5.6.10.0100.01814.78
5.6.00.0080.01314.72
5.5.380.0070.00613.78
5.5.370.0060.01714.89
5.5.360.0060.01714.71
5.5.350.0060.02014.84
5.5.340.0070.02014.83
5.5.330.0070.01314.82
5.5.320.0090.01014.92
5.5.310.0090.01414.84
5.5.300.0060.01814.81
5.5.290.0070.01414.94
5.5.280.0070.01814.79
5.5.270.0080.02114.73
5.5.260.0080.01514.75
5.5.250.0100.01714.79
5.5.240.0110.01014.74
5.5.230.0080.01414.71
5.5.220.0060.01814.83
5.5.210.0090.01814.71
5.5.200.0080.01814.79
5.5.190.0090.01414.70
5.5.180.0090.01914.65
5.5.170.0100.00413.57
5.5.160.0090.01214.67
5.5.150.0090.01314.61
5.5.140.0080.01614.51
5.5.130.0080.01414.53
5.5.120.0080.01814.65
5.5.110.0070.01514.67
5.5.100.0090.01814.69
5.5.90.0080.01814.69
5.5.80.0030.01714.70
5.5.70.0070.01214.73
5.5.60.0080.01814.81
5.5.50.0090.01414.75
5.5.40.0120.01714.71
5.5.30.0090.01314.72
5.5.20.0080.01714.70
5.5.10.0070.02014.69
5.5.00.0090.01114.69
5.4.450.0070.01613.81
5.4.440.0060.01713.75
5.4.430.0070.01513.74
5.4.420.0080.01413.72
5.4.410.0080.01713.72
5.4.400.0060.01813.70
5.4.390.0080.01613.64
5.4.380.0110.01413.65
5.4.370.0070.01313.73
5.4.360.0100.01513.64
5.4.350.0100.00913.76
5.4.340.0090.01613.68
5.4.330.0090.00212.57
5.4.320.0070.01813.70
5.4.310.0090.01513.63
5.4.300.0060.01713.64
5.4.290.0070.01813.71
5.4.280.0080.01713.74
5.4.270.0100.01013.66
5.4.260.0070.01713.69
5.4.250.0090.01013.65
5.4.240.0080.01613.69
5.4.230.0070.01413.56
5.4.220.0090.01313.56
5.4.210.0100.01313.54
5.4.200.0070.01713.60
5.4.190.0090.01413.57
5.4.180.0080.01313.58
5.4.170.0080.00913.65
5.4.160.0060.01213.60
5.4.150.0050.01413.61
5.4.140.0070.01213.21
5.4.130.0090.01413.22
5.4.120.0080.01713.28
5.4.110.0080.01213.30
5.4.100.0070.01713.30
5.4.90.0070.01613.32
5.4.80.0070.01513.37
5.4.70.0090.01013.24
5.4.60.0050.01613.29
5.4.50.0060.01113.24
5.4.40.0090.01413.28
5.4.30.0080.00913.25
5.4.20.0080.01013.32
5.4.10.0060.01013.25
5.4.00.0070.01013.01
5.3.290.0050.01913.28
5.3.280.0050.01713.19
5.3.270.0080.01213.20
5.3.260.0060.01213.24
5.3.250.0050.01213.31
5.3.240.0060.01813.17
5.3.230.0040.01913.29
5.3.220.0040.02013.20
5.3.210.0040.01413.17
5.3.200.0080.01713.16
5.3.190.0060.01613.20
5.3.180.0070.01113.26
5.3.170.0070.01613.28
5.3.160.0070.01513.29
5.3.150.0060.01413.25
5.3.140.0060.01213.17
5.3.130.0100.01213.26
5.3.120.0070.01613.33
5.3.110.0050.01213.24
5.3.100.0080.01413.15
5.3.90.0060.01513.23
5.3.80.0060.01613.04
5.3.70.0100.01213.12
5.3.60.0070.01713.16
5.3.50.0070.01013.15
5.3.40.0060.01313.09
5.3.30.0040.01213.16
5.3.20.0050.01013.01
5.3.10.0080.00912.94
5.3.00.0050.01312.92
5.2.170.0050.01411.99
5.2.160.0050.01611.97
5.2.150.0040.01011.90
5.2.140.0040.01011.89
5.2.130.0030.01111.72
5.2.120.0070.00811.83
5.2.110.0050.00911.86
5.2.100.0070.00911.79
5.2.90.0050.01111.82
5.2.80.0070.00911.75
5.2.70.0070.01211.71
5.2.60.0060.00811.66
5.2.50.0050.00911.68
5.2.40.0040.01011.73
5.2.30.0040.00811.67
5.2.20.0070.00711.68
5.2.10.0040.01011.54
5.2.00.0060.00911.51
5.1.60.0030.00911.00
5.1.50.0050.00710.97
5.1.40.0060.00811.08
5.1.30.0050.00811.16
5.1.20.0060.00711.10
5.1.10.0060.00611.04
5.1.00.0070.00710.80
5.0.50.0030.00810.33
5.0.40.0020.00810.36
5.0.30.0070.01010.30
5.0.20.0020.00910.31
5.0.10.0020.00910.31
5.0.00.0030.01010.30
4.4.90.0030.00410.07
4.4.80.0030.00310.07
4.4.70.0020.00510.07
4.4.60.0020.00510.07
4.4.50.0030.00410.07
4.4.40.0030.00610.07
4.4.30.0020.00510.07
4.4.20.0030.00410.07
4.4.10.0030.00410.07
4.4.00.0030.00610.07
4.3.110.0020.00410.07
4.3.100.0020.00810.07
4.3.90.0040.00310.07
4.3.80.0030.00610.07
4.3.70.0020.00410.07
4.3.60.0040.00410.07
4.3.50.0030.00310.07
4.3.40.0040.00510.07
4.3.30.0000.00610.07
4.3.20.0020.00510.07
4.3.10.0010.00510.07
4.3.00.0010.00510.07

preferences:
60.95 ms | 400 KiB | 5 Q