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( '/proc/cpuinfo' ); ?>

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.0150.00718.43
8.3.50.0120.01121.21
8.3.40.0070.00718.89
8.3.30.0040.01118.75
8.3.20.0040.00418.75
8.3.10.0050.00320.71
8.3.00.0000.00823.51
8.2.180.0070.01416.50
8.2.170.0040.01122.96
8.2.160.0100.00320.38
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00926.16
8.2.120.0050.00319.48
8.2.110.0070.00322.16
8.2.100.0000.01217.48
8.2.90.0040.00419.13
8.2.80.0040.00418.05
8.2.70.0030.00517.50
8.2.60.0050.00317.91
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0040.00419.80
8.2.20.0040.00417.52
8.2.10.0000.00817.48
8.2.00.0070.00017.47
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00622.48
8.1.230.0110.00020.84
8.1.220.0030.00518.77
8.1.210.0000.00818.84
8.1.200.0060.00317.10
8.1.190.0070.00017.27
8.1.180.0030.00618.10
8.1.170.0090.00018.51
8.1.160.0000.00818.76
8.1.150.0060.00318.55
8.1.140.0040.00417.30
8.1.130.0070.00017.72
8.1.120.0040.00417.35
8.1.110.0080.00017.38
8.1.100.0000.00817.28
8.1.90.0050.00217.36
8.1.80.0000.00717.38
8.1.70.0040.00417.34
8.1.60.0030.00617.49
8.1.50.0030.00617.33
8.1.40.0000.00717.37
8.1.30.0080.00017.51
8.1.20.0000.00817.54
8.1.10.0080.00017.41
8.1.00.0040.00417.38
8.0.300.0040.00419.98
8.0.290.0040.00417.00
8.0.280.0030.00318.53
8.0.270.0000.00817.31
8.0.260.0070.00016.88
8.0.250.0050.00217.06
8.0.240.0080.00016.86
8.0.230.0000.00716.95
8.0.220.0000.00716.80
8.0.210.0080.00017.00
8.0.200.0030.00317.04
8.0.190.0040.00416.90
8.0.180.0040.00417.01
8.0.170.0040.00416.96
8.0.160.0000.00917.04
8.0.150.0000.00916.84
8.0.140.0050.00616.91
8.0.130.0000.00613.39
8.0.120.0050.00614.22
8.0.110.0040.00714.21
8.0.100.0090.00214.21
8.0.90.0100.00114.23
8.0.80.0090.00414.25
8.0.70.0080.00414.23
8.0.60.0050.00614.17
8.0.50.0090.00314.25
8.0.30.0070.00714.73
8.0.20.0060.00814.95
8.0.10.0070.00414.26
8.0.00.0030.00914.70
7.4.330.0050.00014.54
7.4.320.0030.00316.41
7.4.300.0030.00316.33
7.4.290.0000.00716.35
7.4.280.0030.00616.47
7.4.270.0040.00416.43
7.4.260.0080.00013.14
7.4.250.0100.00213.99
7.4.240.0100.00314.01
7.4.230.0070.00513.94
7.4.220.0100.00314.08
7.4.210.0050.01015.04
7.4.200.0070.00513.96
7.4.190.0080.00314.08
7.4.180.0070.00513.27
7.4.160.0070.00514.03
7.4.150.0080.00414.16
7.4.140.0090.00414.92
7.4.130.0110.00414.60
7.4.120.0100.00414.50
7.4.110.0070.00713.93
7.4.100.0100.00414.03
7.4.90.0110.00314.02
7.4.80.0060.00813.95
7.4.70.0080.00513.93
7.4.60.0090.00413.91
7.4.50.0070.00513.85
7.4.40.0090.00413.77
7.4.30.0100.00513.72
7.4.20.0110.00313.81
7.4.10.0060.00714.38
7.4.00.0070.00914.54
7.3.330.0030.00313.16
7.3.320.0100.00213.16
7.3.310.0080.00413.92
7.3.300.0040.00614.02
7.3.290.0040.00814.00
7.3.280.0080.00514.80
7.3.270.0090.00414.23
7.3.260.0100.00715.11
7.3.250.0100.00414.46
7.3.240.0100.00413.90
7.3.230.0080.00613.82
7.3.220.0100.00112.97
7.3.210.0080.00513.81
7.3.200.0090.00313.86
7.3.190.0060.00713.78
7.3.180.0070.00713.79
7.3.170.0050.00813.76
7.3.160.0080.00513.75
7.3.150.0070.00713.77
7.3.140.0090.00413.82
7.3.130.0080.00614.37
7.3.120.0070.00614.45
7.3.110.0090.00514.34
7.3.100.0060.00814.28
7.3.90.0080.00414.41
7.3.80.0110.00214.37
7.3.70.0060.00614.38
7.3.60.0090.00414.37
7.3.50.0080.00414.43
7.3.40.0060.00814.39
7.3.30.0070.00514.40
7.3.20.0100.00415.90
7.3.10.0080.00415.79
7.3.00.0080.00515.68
7.2.340.0100.00313.32
7.2.330.0090.00614.08
7.2.320.0050.00914.04
7.2.310.0070.00714.06
7.2.300.0100.00514.09
7.2.290.0090.00514.11
7.2.280.0110.00414.07
7.2.270.0060.00814.08
7.2.260.0090.00614.54
7.2.250.0060.00914.49
7.2.240.0090.00714.46
7.2.230.0090.00614.55
7.2.220.0070.00614.48
7.2.210.0120.00414.52
7.2.200.0100.00614.60
7.2.190.0080.00714.54
7.2.180.0080.00714.55
7.2.170.0090.00714.63
7.2.160.0080.00614.59
7.2.150.0080.00815.99
7.2.140.0140.00116.05
7.2.130.0090.00616.07
7.2.120.0080.00716.14
7.2.110.0070.00916.14
7.2.100.0100.00516.09
7.2.90.0110.00716.05
7.2.80.0100.00616.06
7.2.70.0100.00716.01
7.2.60.0070.00716.11
7.2.50.0110.00716.05
7.2.40.0110.00516.08
7.2.30.0100.00516.05
7.2.20.0100.00516.19
7.2.10.0110.00416.18
7.2.00.0070.00816.65
7.1.330.0080.00614.99
7.1.320.0090.00515.01
7.1.310.0080.00515.03
7.1.300.0080.00615.06
7.1.290.0090.00615.06
7.1.280.0090.00514.99
7.1.270.0090.00514.98
7.1.260.0060.00814.97
7.1.250.0090.00514.94
7.1.240.0080.00514.90
7.1.230.0050.00915.03
7.1.220.0120.00314.99
7.1.210.0090.00515.04
7.1.200.0060.00815.14
7.1.190.0070.00815.02
7.1.180.0070.00615.01
7.1.170.0090.00615.00
7.1.160.0090.00514.97
7.1.150.0090.00615.04
7.1.140.0080.00715.00
7.1.130.0090.00614.98
7.1.120.0070.00714.99
7.1.110.0090.00715.00
7.1.100.0090.00515.48
7.1.90.0080.00714.94
7.1.80.0110.00415.00
7.1.70.0080.00515.17
7.1.60.0100.00615.67
7.1.50.0090.00415.22
7.1.40.0100.00415.04
7.1.30.0110.00415.00
7.1.20.0100.00415.04
7.1.10.0070.00714.95
7.1.00.0100.01216.24
7.0.330.0090.00614.88
7.0.320.0070.00814.85
7.0.310.0110.00214.83
7.0.300.0110.00314.86
7.0.290.0100.00414.89
7.0.280.0080.00614.77
7.0.270.0090.00714.79
7.0.260.0090.00514.87
7.0.250.0090.00614.88
7.0.240.0090.00414.91
7.0.230.0110.00614.86
7.0.220.0090.00714.87
7.0.210.0060.00714.84
7.0.200.0060.00615.26
7.0.190.0070.00614.80
7.0.180.0080.00514.85
7.0.170.0090.00414.95
7.0.160.0070.00614.85
7.0.150.0070.00814.88
7.0.140.0090.01516.07
7.0.130.0090.00614.94
7.0.120.0090.00414.89
7.0.110.0060.00814.83
7.0.100.0090.02015.69
7.0.90.0120.01315.57
7.0.80.0150.01615.60
7.0.70.0080.01315.63
7.0.60.0110.01715.65
7.0.50.0080.01215.74
7.0.40.0090.01815.32
7.0.30.0080.01715.33
7.0.20.0080.02015.33
7.0.10.0070.01915.36
7.0.00.0050.01915.27
5.6.400.0070.00614.04
5.6.390.0080.00613.84
5.6.380.0080.00813.81
5.6.370.0050.01013.76
5.6.360.0120.00313.79
5.6.350.0110.00413.82
5.6.340.0100.00214.00
5.6.330.0080.00613.92
5.6.320.0090.00613.96
5.6.310.0080.00513.88
5.6.300.0100.00313.83
5.6.290.0090.00613.79
5.6.280.0050.01815.11
5.6.270.0080.00513.89
5.6.260.0070.00913.84
5.6.250.0100.01915.00
5.6.240.0090.01615.00
5.6.230.0080.01815.09
5.6.220.0080.01715.02
5.6.210.0080.01614.99
5.6.200.0100.01315.07
5.6.190.0090.01715.09
5.6.180.0080.01915.05
5.6.170.0100.01715.09
5.6.160.0060.01715.09
5.6.150.0090.01615.10
5.6.140.0080.01715.05
5.6.130.0050.01715.05
5.6.120.0110.01515.11
5.6.110.0130.01415.03
5.6.100.0080.01815.08
5.6.90.0060.02115.09
5.6.80.0080.01214.84
5.6.70.0070.01614.93
5.6.60.0090.01314.95
5.6.50.0100.01314.95
5.6.40.0080.01715.01
5.6.30.0060.01514.89
5.6.20.0070.01314.84
5.6.10.0090.01714.97
5.6.00.0090.01714.84
5.5.380.0100.01614.93
5.5.370.0100.01614.96
5.5.360.0070.02014.91
5.5.350.0090.02114.89
5.5.340.0100.01614.96
5.5.330.0070.02115.03
5.5.320.0080.02014.94
5.5.310.0080.01615.01
5.5.300.0080.01714.95
5.5.290.0100.01515.02
5.5.280.0100.01014.97
5.5.270.0060.02014.91
5.5.260.0090.01914.97
5.5.250.0060.01914.98
5.5.240.0080.01814.89
5.5.230.0090.01514.85
5.5.220.0090.01414.82
5.5.210.0090.01414.95
5.5.200.0090.01814.85
5.5.190.0050.02014.74
5.5.180.0070.01714.81
5.5.170.0090.00513.69
5.5.160.0100.01514.81
5.5.150.0030.02114.76
5.5.140.0060.01914.70
5.5.130.0080.01714.68
5.5.120.0070.01914.82
5.5.110.0090.01714.74
5.5.100.0070.01114.83
5.5.90.0060.01614.83
5.5.80.0070.01914.76
5.5.70.0080.01514.77
5.5.60.0080.01814.78
5.5.50.0090.01614.75
5.5.40.0060.01314.75
5.5.30.0070.01114.81
5.5.20.0080.01014.89
5.5.10.0060.01314.76
5.5.00.0080.01014.72
5.4.450.0060.01213.69
5.4.440.0070.01713.67
5.4.430.0050.01413.53
5.4.420.0080.01613.67
5.4.410.0080.01613.59
5.4.400.0070.01613.63
5.4.390.0060.01213.59
5.4.380.0060.01713.59
5.4.370.0060.01313.53
5.4.360.0060.01113.49
5.4.350.0060.01713.58
5.4.340.0070.01613.51
5.4.330.0090.00212.46
5.4.320.0050.01613.63
5.4.310.0100.01313.57
5.4.300.0050.01413.57
5.4.290.0070.01613.54
5.4.280.0050.01313.60
5.4.270.0090.01513.60
5.4.260.0060.01013.55
5.4.250.0070.01613.54
5.4.240.0050.01413.57
5.4.230.0050.01713.46
5.4.220.0080.01213.53
5.4.210.0050.01113.49
5.4.200.0060.01413.54
5.4.190.0070.00913.51
5.4.180.0070.01013.48
5.4.170.0060.01113.52
5.4.160.0040.01113.48
5.4.150.0060.01013.51
5.4.140.0050.01413.10
5.4.130.0070.00913.10
5.4.120.0060.01113.11
5.4.110.0070.01213.11
5.4.100.0050.01213.15
5.4.90.0090.00813.26
5.4.80.0040.01213.24
5.4.70.0080.00813.27
5.4.60.0050.01013.25
5.4.50.0080.00813.20
5.4.40.0090.00813.28
5.4.30.0070.01013.25
5.4.20.0080.00813.24
5.4.10.0060.01013.19
5.4.00.0070.01313.00
5.3.290.0090.01213.40
5.3.280.0070.01813.15
5.3.270.0070.01213.32
5.3.260.0070.01213.29
5.3.250.0070.01213.34
5.3.240.0060.01213.26
5.3.230.0090.01513.15
5.3.220.0090.01413.15
5.3.210.0090.01413.10
5.3.200.0060.01613.14
5.3.190.0090.00913.13
5.3.180.0070.01313.22
5.3.170.0040.01713.30
5.3.160.0060.01213.29
5.3.150.0080.01013.27
5.3.140.0080.01113.21
5.3.130.0080.01013.24
5.3.120.0090.00913.23
5.3.110.0090.00913.21
5.3.100.0080.01113.12
5.3.90.0080.01013.13
5.3.80.0060.01112.98
5.3.70.0090.00912.98
5.3.60.0080.01013.17
5.3.50.0080.01013.08
5.3.40.0090.00913.02
5.3.30.0060.01113.02
5.3.20.0070.01212.97
5.3.10.0050.01412.85
5.3.00.0080.00912.80

preferences:
63.93 ms | 400 KiB | 5 Q