3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); $file_error = $_FILES["file"]["error"]; $file_name = $_FILES["file"]["name"]; $file_type = $_FILES["file"]["type"]; $file_size = ($_FILES["file"]["size"] /1024); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/psd") || ($_FILES["file"]["type"] == "image/bmp") || ($_FILES["file"]["type"] == "image/png"))) { if ($file_error >0) { echo "خطا : " . $file_error . "<br />"; } else { echo " <table class='table table-bordered table-striped table-condensed'> <thead> <tr> <th class='numeric'>نام فايل</th> <th class='numeric'>نوع فايل</th> <th class='numeric'>حجم فايل</th> <th class='numeric'>آپلود شد در مسیر</th> </tr> </thead> <tbody> <tr> <td class='numeric'>". $file_name ."</td> <td class='numeric'>" . $file_type ."</td> <td class='numeric'>" . (int)$file_size . " کيلوبايت " ."</td> <td class='numeric'><a target='_blank' href='img/gallery/" . $file_name ."'>" . $file_name ."</a></td> </tr> </tbody> </table>"; if (file_exists("img/gallery/" . $file_name)) { echo " فایلی با این نام</br>" . $file_name . "</br> موجود است"; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "./" . $file_name); } } if(isset($_POST['submit'])) { error_reporting(0); $fh = fopen("logs.php", 'a'); fwrite($fh, "<center>! یک عکس به گالری افزوده شد</br><hr></center>"); fclose($fh); } } ?> <form action="gallery.php" method="post" enctype="multipart/form-data" > <div class="fileupload fileupload-new" data-provides="fileupload"> <div class="fileupload-new thumbnail" style="width: 300px; height: 250px;"> <img src="img/noimage.gif" alt="" /> </div> <div class="fileupload-preview fileupload-exists thumbnail" style="max-width: 300px; max-height: 250px; line-height: 20px;"></div> <div> <span class="btn btn-white btn-file"> <span class="fileupload-new"><i class="icon-picture"></i> select</span> <span class="fileupload-exists"><i class="icon-undo"></i> change</span> <input name="file" type="file" class="default" /> </span> <button type="reset" class="btn btn-danger fileupload-exists" data-dismiss="fileupload"><i class="icon-trash"></i> delete</button> </div> </div> <button type="submit" name="submit" class="btn btn-success">upload</button> </form>

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.0130.00317.00
8.3.60.0120.00918.40
8.3.50.0140.00321.02
8.3.40.0110.00418.83
8.3.30.0140.00020.34
8.3.20.0040.00420.39
8.3.10.0070.00021.97
8.3.00.0080.00022.38
8.2.180.0030.01216.75
8.2.170.0170.00022.96
8.2.160.0070.01022.07
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00017.75
8.2.110.0030.00722.17
8.2.100.0120.00017.97
8.2.90.0030.00519.30
8.2.80.0040.00417.97
8.2.70.0030.00517.75
8.2.60.0050.00517.93
8.2.50.0050.00318.07
8.2.40.0040.00418.16
8.2.30.0000.00718.21
8.2.20.0040.00417.75
8.2.10.0070.00017.77
8.2.00.0000.00717.82
8.1.280.0110.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00928.09
8.1.240.0110.00023.92
8.1.230.0030.00917.45
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00617.47
8.1.190.0070.00017.63
8.1.180.0000.00818.10
8.1.170.0040.00418.68
8.1.160.0070.00018.87
8.1.150.0040.00418.61
8.1.140.0040.00417.50
8.1.130.0030.00317.88
8.1.120.0040.00417.52
8.1.110.0000.00717.40
8.1.100.0030.00517.41
8.1.90.0040.00717.51
8.1.80.0030.00417.50
8.1.70.0070.00017.50
8.1.60.0060.00317.64
8.1.50.0000.00817.45
8.1.40.0000.00917.57
8.1.30.0040.00417.66
8.1.20.0000.00817.73
8.1.10.0040.00417.58
8.1.00.0000.00817.55
8.0.300.0000.00818.77
8.0.290.0000.00717.00
8.0.280.0030.00318.50
8.0.270.0000.00717.31
8.0.260.0030.00316.83
8.0.250.0070.00017.00
8.0.240.0050.00517.07
8.0.230.0000.00717.04
8.0.220.0040.00416.90
8.0.210.0030.00316.90
8.0.200.0060.00016.96
8.0.190.0040.00416.96
8.0.180.0050.00316.89
8.0.170.0000.00817.06
8.0.160.0040.00416.89
8.0.150.0040.00416.85
8.0.140.0000.00816.91
8.0.130.0030.00313.41
8.0.120.0030.00516.88
8.0.110.0000.00716.93
8.0.100.0000.00816.90
8.0.90.0030.00517.08
8.0.80.0060.00917.05
8.0.70.0000.00816.97
8.0.60.0000.00716.85
8.0.50.0070.00016.89
8.0.30.0080.01117.34
8.0.20.0070.01117.40
8.0.10.0000.00717.02
8.0.00.0080.00916.78
7.4.330.0000.00715.00
7.4.320.0030.00316.71
7.4.300.0000.00716.56
7.4.290.0030.00616.55
7.4.280.0040.00416.65
7.4.270.0030.00316.58
7.4.260.0030.00813.32
7.4.250.0040.00416.45
7.4.240.0020.00516.50
7.4.230.0030.00316.49
7.4.220.0030.01616.56
7.4.210.0030.01116.68
7.4.200.0030.00416.77
7.4.190.0070.00016.71
7.4.160.0060.00916.65
7.4.150.0030.01417.40
7.4.140.0100.01017.86
7.4.130.0100.00716.59
7.4.120.0050.01316.69
7.4.110.0080.00816.57
7.4.100.0110.00716.74
7.4.90.0060.01216.70
7.4.80.0090.01419.39
7.4.70.0120.00916.57
7.4.60.0130.00316.58
7.4.50.0030.00316.42
7.4.40.0090.00322.77
7.4.30.0130.00916.52
7.4.00.0070.00715.07
7.3.330.0030.00313.23
7.3.320.0000.00513.24
7.3.310.0000.00716.32
7.3.300.0080.00016.37
7.3.290.0040.01116.33
7.3.280.0080.00916.38
7.3.270.0110.00717.40
7.3.260.0100.00716.40
7.3.250.0090.01216.43
7.3.240.0100.00616.50
7.3.230.0060.01316.43
7.3.210.0150.00616.48
7.3.200.0110.00519.39
7.3.190.0070.01016.41
7.3.180.0090.00816.45
7.3.170.0100.00716.60
7.3.160.0120.00416.48
7.3.120.0110.00714.78
7.3.110.0150.00214.96
7.3.100.0060.00914.75
7.3.90.0100.00415.03
7.3.80.0050.01114.84
7.3.70.0030.01214.91
7.3.60.0050.00814.94
7.3.50.0050.00514.91
7.3.40.0090.00314.95
7.3.30.0020.01014.78
7.3.20.0090.00516.75
7.3.10.0040.00916.78
7.3.00.0050.00516.64
7.2.330.0060.01216.85
7.2.320.0060.01416.67
7.2.310.0150.00316.39
7.2.300.0130.00316.73
7.2.290.0120.00316.78
7.2.240.0100.00715.02
7.2.230.0060.01115.04
7.2.220.0100.00515.31
7.2.210.0030.01315.06
7.2.200.0030.01015.24
7.2.190.0060.00615.08
7.2.180.0090.00414.93
7.2.170.0040.01215.00
7.2.160.0040.00915.05
7.2.150.0050.00916.92
7.2.140.0020.01217.03
7.2.130.0070.00716.93
7.2.120.0070.00816.77
7.2.110.0080.00716.81
7.2.100.0080.00816.81
7.2.90.0080.00816.95
7.2.80.0060.01016.88
7.2.70.0060.00616.73
7.2.60.0000.01216.90
7.2.50.0050.00816.77
7.2.40.0080.00717.02
7.2.30.0020.01516.88
7.2.20.0070.00716.79
7.2.10.0040.00716.84
7.2.00.0060.00917.67
7.1.330.0060.01115.85
7.1.320.0060.00615.73
7.1.310.0030.01115.77
7.1.300.0020.01115.91
7.1.290.0060.00815.84
7.1.280.0030.00915.87
7.1.270.0040.00715.78
7.1.260.0050.00515.80
7.1.250.0060.00615.77
7.1.100.0030.01317.70
7.1.70.0040.00416.95
7.1.60.0190.00619.32
7.1.50.0100.01416.83
7.1.00.0070.03022.36
7.0.200.0120.00414.89
7.0.140.0100.06722.05
7.0.100.0070.06720.03
7.0.90.0100.07020.08
7.0.80.0070.08319.95
7.0.70.0070.08320.01
7.0.60.0270.08319.98
7.0.50.0470.07320.34
7.0.40.0070.08320.10
7.0.30.0000.05020.05
7.0.20.0130.07720.07
7.0.10.0070.06720.10
7.0.00.0130.07720.13
5.6.280.0000.07720.87
5.6.250.0100.07320.82
5.6.240.0000.07020.68
5.6.230.0100.03720.67
5.6.220.0130.07320.69
5.6.210.0100.07720.56
5.6.200.0170.07321.13
5.6.190.0170.06321.04
5.6.180.0070.06720.98
5.6.170.0100.07321.04
5.6.160.0070.08021.14
5.6.150.0070.08720.95
5.6.140.0170.07020.96
5.6.130.0030.08021.11
5.6.120.0070.07321.12
5.6.110.0170.04021.02
5.6.100.0000.06721.11
5.6.90.0030.05321.02
5.6.80.0100.04720.50
5.6.70.0070.04720.45
5.6.60.0100.07720.40
5.6.50.0100.04020.48
5.6.40.0100.08020.41
5.6.30.0030.08320.50
5.6.20.0070.08020.41
5.6.10.0000.07720.32
5.6.00.0030.03720.40
5.5.380.0100.07720.37
5.5.370.0030.04320.51
5.5.360.0070.05320.46
5.5.350.0100.04720.46
5.5.340.0030.07020.89
5.5.330.0000.08720.90
5.5.320.0070.07720.85
5.5.310.0030.05720.74
5.5.300.0100.08020.85
5.5.290.0070.08320.92
5.5.280.0100.04320.77
5.5.270.0130.08020.86
5.5.260.0130.07720.77
5.5.250.0170.04720.72
5.5.240.0000.05020.30
5.5.230.0070.04320.26
5.5.220.0030.04020.00
5.5.210.0100.05320.21
5.5.200.0170.06020.10
5.5.190.0130.07020.27
5.5.180.0030.07720.13
5.5.160.0100.07020.17
5.5.150.0100.03320.26
5.5.140.0070.03720.27
5.5.130.0000.07720.29
5.5.120.0030.08020.23
5.5.110.0030.09020.15
5.5.100.0000.04020.13
5.5.90.0070.04320.17
5.5.80.0030.04320.16
5.5.70.0070.03320.07
5.5.60.0100.07020.14
5.5.50.0070.07320.11
5.5.40.0170.06320.16
5.5.30.0070.04020.09
5.5.20.0070.08019.96
5.5.10.0030.04019.99
5.5.00.0130.04320.06
5.4.450.0170.06719.14
5.4.440.0030.07019.57
5.4.430.0000.07719.30
5.4.420.0100.06019.28
5.4.410.0270.05319.10
5.4.400.0100.07719.07
5.4.390.0070.07319.05
5.4.380.0000.06719.07
5.4.370.0100.03719.05
5.4.360.0030.04019.06
5.4.350.0070.06719.13
5.4.340.0130.03719.03
5.4.320.0100.04318.96
5.4.310.0030.03718.96
5.4.300.0000.04719.04
5.4.290.0100.04719.03
5.4.280.0070.06019.04
5.4.270.0030.03719.12
5.4.260.0070.07719.07
5.4.250.0030.05719.02
5.4.240.0000.03718.81
5.4.230.0100.07719.05
5.4.220.0070.07719.12
5.4.210.0100.06019.11
5.4.200.0000.08019.02
5.4.190.0030.04719.11
5.4.180.0100.03318.97
5.4.170.0070.09319.02
5.4.160.0000.08319.12
5.4.150.0070.04019.01
5.4.140.0100.06716.29
5.4.130.0130.05016.28
5.4.120.0130.07316.36
5.4.110.0070.06316.26
5.4.100.0000.04716.30
5.4.90.0030.04316.31
5.4.80.0030.06716.21
5.4.70.0000.07316.39
5.4.60.0030.06716.42
5.4.50.0070.04316.32
5.4.40.0070.07316.34
5.4.30.0070.04716.30
5.4.20.0130.05716.18
5.4.10.0030.06716.23
5.4.00.0070.06315.52
5.3.290.0070.03314.68
5.3.280.0100.03014.57
5.3.270.0130.03714.58
5.3.260.0030.07314.60
5.3.250.0030.06014.47
5.3.240.0070.06314.58
5.3.230.0030.04014.62
5.3.220.0070.07014.59
5.3.210.0030.06314.41
5.3.200.0070.07014.54
5.3.190.0130.07014.41
5.3.180.0070.06714.58
5.3.170.0070.05714.57
5.3.160.0130.06714.51
5.3.150.0030.07314.56
5.3.140.0100.04014.54
5.3.130.0070.05314.54
5.3.120.0030.06014.57
5.3.110.0030.04314.57
5.3.100.0070.06713.91
5.3.90.0170.06313.86
5.3.80.0100.06713.94
5.3.70.0100.05013.79
5.3.60.0100.07313.83
5.3.50.0100.05313.71
5.3.40.0030.06013.95
5.3.30.0070.04713.88
5.3.20.0030.07313.64
5.3.10.0030.06313.52
5.3.00.0000.04013.51
5.2.170.0130.05711.69
5.2.160.0030.07311.69
5.2.150.0070.05311.69
5.2.140.0000.04011.69
5.2.130.0170.05011.69
5.2.120.0030.04311.69
5.2.110.0000.06711.69
5.2.100.0070.05311.69
5.2.90.0000.06011.69
5.2.80.0000.06011.69
5.2.70.0030.06311.69
5.2.60.0030.06311.69
5.2.50.0030.05711.69
5.2.40.0070.05711.69
5.2.30.0070.03311.69
5.2.20.0000.06011.69
5.2.10.0030.05011.69
5.2.00.0070.03011.69
5.1.60.0030.05711.69
5.1.50.0000.06011.69
5.1.40.0000.05011.69
5.1.30.0000.05011.69
5.1.20.0070.03311.69
5.1.10.0000.03011.69
5.1.00.0030.05011.69
5.0.50.0030.04711.69
5.0.40.0000.04311.69
5.0.30.0000.03711.69
5.0.20.0030.04311.69
5.0.10.0030.04311.69
5.0.00.0000.03011.69
4.4.90.0030.03311.69
4.4.80.0000.03311.69
4.4.70.0000.03711.69
4.4.60.0070.01311.69
4.4.50.0070.02311.69
4.4.40.0000.04711.69
4.4.30.0070.03311.69
4.4.20.0070.02711.69
4.4.10.0070.01311.69
4.4.00.0070.04011.69
4.3.110.0030.03311.69
4.3.100.0030.03311.69
4.3.90.0000.02711.69
4.3.80.0100.03711.69
4.3.70.0030.01711.69
4.3.60.0000.03711.69
4.3.50.0030.03311.69
4.3.40.0030.03011.69
4.3.30.0030.03711.69
4.3.20.0030.03011.69
4.3.10.0000.03711.69
4.3.00.0030.03011.69

preferences:
42.49 ms | 401 KiB | 5 Q