3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Wolfcast CHMOD Scriptlet</title> <meta name="description" content="Wolfcast CHMOD Scriptlet Version 1.0"> <meta name="author" content="Alexandre Valiquette (www.wolfcast.com)"> <style type="text/css"> div#logtext { width: 875px; height: 300px; overflow: auto; border: solid 1px black; } div#logtext p { white-space: nowrap; margin: 0px; } div#logtext p.success { color: #008000; } div#logtext p.error { color: #ff0000; } </style> </head> <body> <p> <big><b>Wolfcast CHMOD Scriptlet</b></big><br> <small>Version 1.0<br> <a href="http://www.wolfcast.com">www.wolfcast.com</a><br></small> </p> <!-- START - PHP generated output --> <?php //--------------------------------------------------------------------------- //rChmod will recursively CHMOD $dir and it's content to $dirModes for directories and to $fileModes for files. //$dirModes and $fileModes must start with 0 (755 become 0755 for instance). //rChmod returns the number of failed CHMOD operations. function rChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ) { $retval = 0; //Number of failed CHMOD operations echo "<p style=\"margin-bottom: 0px\"><b>Log:</b></p>\r\n<div id=\"logtext\">\r\n"; $d = new RecursiveDirectoryIterator( $dir ); foreach ( new RecursiveIteratorIterator( $d, 1 ) as $path ) { $chmodret = false; if ( $path->isDir() ) $chmodret = chmod( $path, $dirModes ); else if ( is_file( $path ) ) $chmodret = chmod( $path, $fileModes ); if ($chmodret) $pclassname = "success"; else { $pclassname = "error"; ++$retval; } echo "<p class=\"" . $pclassname . "\">" . $path . "</p>\r\n"; } echo "</div>\r\n"; return $retval; } //--------------------------------------------------------------------------- //Change the following line to fit your needs (path, directories CHMOD value, files CHMOD value). CHMOD values must start with 0. $nbfailed = rChmod( "/home/lettreaua/www/ ", 0755, 0644 ); echo "<p style=\"margin-top: 0px\"><b>"; if ($nbfailed > 0) { echo $nbfailed . " CHMOD operation(s) failed! See log above."; } else echo "No error encountered."; echo "</b></p>\r\n"; ?> <!-- END - PHP generated output --> <p> <img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Strict" height="31" width="88"> </p> </body> </html>

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.70.0120.00316.61
8.3.60.0040.01116.75
8.3.50.0120.00722.96
8.3.40.0070.00719.02
8.3.30.0090.00619.00
8.3.20.0040.00420.16
8.3.10.0030.00620.47
8.3.00.0040.00419.25
8.2.180.0090.00916.35
8.2.170.0150.00022.96
8.2.160.0130.00020.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00821.02
8.2.110.0030.00620.50
8.2.100.0040.00718.09
8.2.90.0080.00319.22
8.2.80.0060.00317.97
8.2.70.0070.00317.48
8.2.60.0030.00618.03
8.2.50.0030.00618.07
8.2.40.0060.00318.22
8.2.30.0050.00319.54
8.2.20.0000.00817.73
8.2.10.0040.00418.02
8.2.00.0070.00317.78
8.1.280.0060.01225.92
8.1.270.0030.00522.14
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.92
8.1.230.0040.00719.07
8.1.220.0080.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.36
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0050.00318.59
8.1.160.0040.00421.99
8.1.150.0000.00718.74
8.1.140.0040.00417.46
8.1.130.0080.00017.92
8.1.120.0050.00217.40
8.1.110.0000.00917.41
8.1.100.0000.00717.36
8.1.90.0000.00717.41
8.1.80.0040.00417.33
8.1.70.0040.00417.34
8.1.60.0080.00317.61
8.1.50.0030.00617.45
8.1.40.0040.00417.45
8.1.30.0090.00017.68
8.1.20.0030.00617.55
8.1.10.0040.00417.66
8.1.00.0030.00617.57
8.0.300.0030.00618.77
8.0.290.0000.00716.88
8.0.280.0000.00818.41
8.0.270.0050.00317.34
8.0.260.0030.00317.27
8.0.250.0040.00417.03
8.0.240.0040.00417.00
8.0.230.0030.00317.00
8.0.220.0040.00416.83
8.0.210.0040.00416.95
8.0.200.0060.00016.97
8.0.190.0000.00817.01
8.0.180.0050.00216.98
8.0.170.0040.00417.02
8.0.160.0000.00817.04
8.0.150.0040.00416.94
8.0.140.0060.00316.88
8.0.130.0030.00313.34
8.0.120.0030.00716.98
8.0.110.0070.00016.76
8.0.100.0070.00016.80
8.0.90.0000.00716.73
8.0.80.0090.00616.96
8.0.70.0050.00216.78
8.0.60.0040.00316.82
8.0.50.0000.00716.80
8.0.30.0090.01117.33
8.0.20.0070.01317.44
8.0.10.0090.00017.09
8.0.00.0100.01116.74
7.4.330.0020.00215.00
7.4.320.0030.00316.63
7.4.300.0000.00616.54
7.4.290.0000.00716.57
7.4.280.0030.00716.46
7.4.270.0000.00716.60
7.4.260.0070.00016.44
7.4.250.0040.00416.65
7.4.240.0040.00416.63
7.4.230.0040.00416.39
7.4.220.0080.01216.57
7.4.210.0110.00316.69
7.4.200.0070.00016.54
7.4.160.0100.00716.64
7.4.150.0150.00617.40
7.4.140.0080.01017.86
7.4.130.0140.00616.65
7.4.120.0140.00316.54
7.4.110.0040.01916.59
7.4.100.0120.00816.63
7.4.90.0150.00316.64
7.4.80.0160.00319.39
7.4.70.0070.01116.60
7.4.60.0090.00916.55
7.4.50.0000.00416.50
7.4.40.0080.01416.64
7.4.30.0040.01216.65
7.4.00.0000.01514.64
7.3.330.0030.00313.29
7.3.320.0050.00013.34
7.3.310.0000.00716.22
7.3.300.0040.00416.25
7.3.290.0080.00816.36
7.3.280.0070.00916.34
7.3.270.0110.01017.40
7.3.260.0110.00616.59
7.3.250.0150.00716.38
7.3.240.0140.00716.39
7.3.230.0100.00616.39
7.3.210.0040.01316.55
7.3.200.0060.01219.39
7.3.190.0090.00616.27
7.3.180.0100.00616.52
7.3.170.0080.01116.44
7.3.160.0160.00016.47
7.3.10.0000.01216.57
7.3.00.0030.01316.33
7.2.330.0040.01216.79
7.2.320.0080.00816.71
7.2.310.0060.01116.78
7.2.300.0140.01016.80
7.2.290.0130.00316.77
7.2.130.0070.00716.64
7.2.120.0140.00016.87
7.2.110.0000.01516.76
7.2.100.0030.00916.89
7.2.90.0110.00316.67
7.2.80.0090.00616.69
7.2.70.0090.00016.89
7.2.60.0080.00616.81
7.2.50.0080.00416.98
7.2.40.0030.00616.73
7.2.30.0130.00016.95
7.2.20.0030.00716.97
7.2.10.0080.00616.67
7.2.00.0050.00918.22
7.1.250.0040.01115.73
7.1.200.0080.00415.51
7.1.100.0040.00817.75
7.1.70.0070.00317.05
7.1.60.0070.01419.61
7.1.50.0090.00916.85
7.1.00.0000.08022.37
7.0.200.0030.00616.75
7.0.140.0070.07321.95
7.0.60.0070.05020.10
7.0.50.0100.07717.87
7.0.40.0100.08020.40
7.0.30.0500.08020.24
7.0.20.0300.04720.41
7.0.10.0230.07020.21
7.0.00.0100.09020.07
5.6.280.0100.06720.93
5.6.210.0170.07320.47
5.6.200.0100.08318.23
5.6.190.0070.07720.57
5.6.180.0130.05320.52
5.6.170.0200.07020.47
5.6.160.0030.08320.39
5.6.150.0070.08018.15
5.6.140.0100.08018.21
5.6.130.0100.08718.11
5.6.120.0100.05021.02
5.6.110.0030.08720.98
5.6.100.0200.06721.12
5.6.90.0000.09021.13
5.6.80.0030.09020.52
5.6.70.4470.04020.38
5.5.350.0200.07320.37
5.5.340.0070.04318.07
5.5.330.0130.06720.48
5.5.320.0200.04020.30
5.5.310.0270.03320.35
5.5.300.0030.07317.95
5.5.290.0030.06318.02
5.5.280.0070.03720.88
5.5.270.0100.07020.87
5.5.260.0030.04320.89
5.5.250.0070.06720.62
5.5.240.0270.06320.27
5.4.450.1830.03719.27
5.4.440.0570.04319.20
5.4.430.0070.05719.22
5.4.420.0070.06019.57
5.4.410.0100.05319.41
5.4.400.0130.05019.16
5.4.390.0100.05319.34
5.4.380.0130.06318.57
5.4.370.0200.05318.82
5.4.360.0130.06718.53
5.4.350.0230.05018.79
5.4.340.0230.05018.73
5.4.320.0080.03412.53
5.4.310.0080.03612.52
5.4.300.0070.03612.53
5.4.290.0080.03712.52
5.4.280.0110.03112.43
5.4.270.0050.04012.42
5.4.260.0070.03612.42
5.4.250.0060.03712.43
5.4.240.0050.03612.42
5.4.230.0060.03812.42
5.4.220.0070.03612.41
5.4.210.0100.04312.42
5.4.200.0040.04012.42
5.4.190.0080.03512.41
5.4.180.0050.03912.41
5.4.170.0070.03912.42
5.4.160.0080.03512.42
5.4.150.0070.04112.41
5.4.140.0080.04112.09
5.4.130.0060.04012.08
5.4.120.0060.03612.04
5.4.110.0040.03812.04
5.4.100.0070.03512.04
5.4.90.0070.03512.04
5.4.80.0040.04012.03
5.4.70.0030.03812.03
5.4.60.0060.03612.03
5.4.50.0050.03712.03
5.4.40.0060.03512.02
5.4.30.0060.03512.02
5.4.20.0070.03412.02
5.4.10.0090.03212.02
5.4.00.0070.03611.51
5.3.290.0080.03812.80
5.3.280.0100.03412.71
5.3.270.0060.03812.73
5.3.260.0060.04212.72
5.3.250.0060.04512.72
5.3.240.0080.03612.72
5.3.230.0060.03712.71
5.3.220.0070.03512.68
5.3.210.0050.04112.68
5.3.200.0080.03512.68
5.3.190.0080.03612.67
5.3.180.0030.03912.67
5.3.170.0090.03412.67
5.3.160.0080.03612.67
5.3.150.0070.04212.67
5.3.140.0080.03512.66
5.3.130.0060.03912.66
5.3.120.0040.04212.66
5.3.110.0060.03912.66
5.3.100.0080.03612.13
5.3.90.0050.03912.12
5.3.80.0060.04412.11
5.3.70.0080.03512.11
5.3.60.0060.03612.10
5.3.50.0060.03612.04
5.3.40.0040.03812.04
5.3.30.0070.03412.00
5.3.20.0070.03311.79
5.3.10.0030.03911.75
5.3.00.0080.03611.73
5.2.170.0040.0329.24
5.2.160.0060.0289.24
5.2.150.0030.0339.24
5.2.140.0080.0289.24
5.2.130.0060.0339.20
5.2.120.0040.0309.20
5.2.110.0060.0289.21
5.2.100.0040.0299.20
5.2.90.0060.0299.20
5.2.80.0030.0329.20
5.2.70.0060.0299.20
5.2.60.0030.0329.15
5.2.50.0050.0309.12
5.2.40.0060.0279.09
5.2.30.0050.0309.07
5.2.20.0060.0289.07
5.2.10.0050.0288.96
5.2.00.0030.0358.84
5.1.60.0040.0248.11
5.1.50.0050.0258.11
5.1.40.0070.0238.10
5.1.30.0050.0258.44
5.1.20.0060.0258.46
5.1.10.0060.0268.20
5.1.00.0040.0288.19
5.0.50.0050.0206.68
5.0.40.0020.0216.54
5.0.30.0040.0316.35
5.0.20.0020.0216.32
5.0.10.0020.0226.30
5.0.00.0050.0306.29
4.4.90.0020.0164.78
4.4.80.0030.0154.75
4.4.70.0030.0154.76
4.4.60.0010.0174.76
4.4.50.0060.0124.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0040.0184.84
4.4.10.0030.0194.85
4.4.00.0080.0234.76
4.3.110.0030.0164.67
4.3.100.0050.0134.67
4.3.90.0020.0164.64
4.3.80.0010.0264.58
4.3.70.0050.0134.63
4.3.60.0020.0174.63
4.3.50.0020.0174.63
4.3.40.0040.0244.54
4.3.30.0000.0193.32
4.3.20.0010.0173.30
4.3.10.0020.0173.25
4.3.00.0070.01718.16

preferences:
46.59 ms | 401 KiB | 5 Q