3v4l.org

run code in 300+ PHP versions simultaneously
<?Php $file_upload="true"; $file_up_size=$_FILES['file_up'][size]; echo $_FILES[file_up][name]; if ($_FILES[file_up][size]>250000){$msg=$msg."Your uploaded file size is more than 250KB so please reduce the file size and then upload.<BR>"; $file_upload="false";} if (!($_FILES[file_up][type] =="image/jpeg" OR $_FILES[file_up][type] =="image/gif")) {$msg=$msg."Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>"; $file_upload="false";} $file_name=$_FILES[file_up][name]; $add="upload/$file_name"; // the path with the file name where the file will be stored if($file_upload=="true"){ if(move_uploaded_file ($_FILES[file_up][tmp_name], $add)){ // do your coding here to give a thanks message or any other thing. }else{echo "Failed to upload file Contact Site admin to fix the problem";} }else{ echo $msg; } ?>

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.0120.00916.63
8.3.50.0060.01221.02
8.3.40.0060.00918.64
8.3.30.0090.00618.79
8.3.20.0000.00820.29
8.3.10.0040.00421.87
8.3.00.0000.00819.43
8.2.180.0100.00616.35
8.2.170.0110.00722.96
8.2.160.0100.00320.47
8.2.150.0050.00324.18
8.2.140.0110.00424.66
8.2.130.0070.00026.16
8.2.120.0100.00017.63
8.2.110.0060.00319.27
8.2.100.0090.00317.91
8.2.90.0040.00419.13
8.2.80.0080.00017.97
8.2.70.0040.00417.50
8.2.60.0000.00817.91
8.2.50.0000.01018.07
8.2.40.0080.00019.36
8.2.30.0020.00519.84
8.2.20.0040.00417.70
8.2.10.0040.00418.20
8.2.00.0000.00818.15
8.1.280.0070.00725.92
8.1.270.0140.00420.28
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00319.59
8.1.230.0070.00417.42
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.13
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0000.00818.49
8.1.160.0050.00221.96
8.1.150.0100.00018.98
8.1.140.0050.00317.47
8.1.130.0070.00017.64
8.1.120.0000.00917.55
8.1.110.0040.00417.46
8.1.100.0040.00417.48
8.1.90.0040.00417.55
8.1.80.0000.00817.38
8.1.70.0080.00017.42
8.1.60.0080.00017.60
8.1.50.0000.00917.58
8.1.40.0000.00817.55
8.1.30.0060.00317.57
8.1.20.0040.00417.70
8.1.10.0050.00317.49
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0070.00018.38
8.0.270.0050.00217.20
8.0.260.0030.00617.29
8.0.250.0040.00416.98
8.0.240.0060.00017.07
8.0.230.0000.00717.02
8.0.220.0000.00717.05
8.0.210.0000.00717.03
8.0.200.0000.00616.91
8.0.190.0040.00416.91
8.0.180.0070.00016.83
8.0.170.0050.00316.96
8.0.160.0060.00317.02
8.0.150.0000.00816.92
8.0.140.0000.00817.01
8.0.130.0000.00513.41
8.0.120.0080.00016.96
8.0.110.0000.00816.88
8.0.100.0040.00416.98
8.0.90.0040.00416.96
8.0.80.0090.00916.94
8.0.70.0000.00717.02
8.0.60.0000.00817.05
8.0.50.0000.00816.83
8.0.30.0070.01217.18
8.0.20.0050.01317.40
8.0.10.0070.00016.98
8.0.00.0080.00916.63
7.4.330.0000.00615.09
7.4.320.0030.00316.58
7.4.300.0060.00016.44
7.4.290.0030.00616.53
7.4.280.0040.00416.65
7.4.270.0030.00516.54
7.4.260.0040.00416.52
7.4.250.0000.00716.50
7.4.240.0030.00516.66
7.4.230.0030.00316.71
7.4.220.0150.00916.48
7.4.210.0080.01016.64
7.4.200.0000.00716.61
7.4.160.0120.00316.47
7.4.150.0080.01217.40
7.4.140.0060.01317.86
7.4.130.0100.00716.65
7.4.120.0080.00916.48
7.4.110.0120.00616.45
7.4.100.0170.00716.55
7.4.90.0090.01216.54
7.4.80.0100.00719.39
7.4.70.0110.00716.53
7.4.60.0090.00916.58
7.4.50.0030.00616.71
7.4.40.0030.01516.38
7.4.30.0120.00916.54
7.4.00.0110.00715.21
7.3.330.0020.00213.21
7.3.320.0000.00513.26
7.3.310.0060.00316.35
7.3.300.0000.00616.44
7.3.290.0070.00016.33
7.3.280.0130.00716.39
7.3.270.0040.01417.40
7.3.260.0140.00716.44
7.3.250.0130.00916.50
7.3.240.0140.00316.69
7.3.230.0120.00616.45
7.3.210.0030.01616.36
7.3.200.0110.00616.36
7.3.190.0090.00916.32
7.3.180.0090.00916.45
7.3.170.0090.00916.30
7.3.160.0110.01116.60
7.2.330.0030.01316.82
7.2.320.0110.00816.75
7.2.310.0070.01016.72
7.2.300.0060.01116.82
7.2.290.0030.02016.71
7.2.60.0080.00817.08
7.2.00.0040.00419.31
7.1.200.0000.01315.98
7.1.100.0090.00618.28
7.1.70.0040.00416.95
7.1.60.0040.00720.03
7.1.50.0090.01516.85
7.1.00.0030.07722.55
7.0.200.0450.00314.41
7.0.60.0100.06319.83
7.0.50.0170.06717.88
7.0.40.0100.08319.96
7.0.30.0170.04720.18
7.0.20.0200.09020.12
7.0.10.0070.04019.99
7.0.00.0100.04720.01
5.6.280.0030.06320.93
5.6.210.0070.04720.77
5.6.200.0070.08018.21
5.6.190.0100.03720.40
5.6.180.3230.03720.41
5.6.170.0300.07720.49
5.6.160.0000.04320.41
5.6.150.0030.05018.16
5.6.140.0100.08018.15
5.6.130.0070.08718.23
5.6.120.0130.04321.06
5.6.110.0070.06021.12
5.6.100.0070.03720.99
5.6.90.0070.05320.88
5.6.80.0200.07020.41
5.6.70.4200.03720.39
5.5.350.0200.08320.39
5.5.340.0000.08717.97
5.5.330.0030.04020.07
5.5.320.4130.03720.13
5.5.310.0270.07320.29
5.5.300.0070.05017.94
5.5.290.0000.04317.96
5.5.280.0030.04320.88
5.5.270.0070.08020.80
5.5.260.0070.08720.89
5.5.250.0170.07320.79
5.5.240.0300.06320.04
5.4.450.0630.06019.11
5.4.440.0600.05719.57
5.4.430.0400.06319.45
5.4.420.0600.06019.10
5.4.410.0630.05319.32
5.4.400.0900.05319.14
5.4.390.0670.07318.90
5.4.380.0730.05719.19
5.4.370.0600.05319.22
5.4.360.0670.06719.27
5.4.350.0730.05318.79
5.4.340.0800.06019.12
5.4.320.0570.06319.31
5.4.310.0600.05718.99
5.4.300.0630.05018.77
5.4.290.0530.05019.22
5.4.280.0500.06319.14
5.4.270.0600.06318.95
5.4.260.0670.04719.14
5.4.250.0670.05319.06
5.4.240.0630.05719.14
5.4.230.0630.05319.06
5.4.220.0670.05718.94
5.4.210.0670.05319.13
5.4.200.0700.05718.94
5.4.190.0730.06719.29
5.4.180.0670.06319.13
5.4.170.0630.05718.94
5.4.160.0600.06719.04
5.4.150.0630.06719.13
5.4.140.0870.06016.44
5.4.130.0600.07716.47
5.4.120.0770.07016.25
5.4.110.0730.05016.19
5.4.100.0630.06016.55
5.4.90.0570.04716.39
5.4.80.0630.04716.20
5.4.70.0100.04316.48
5.4.60.0300.04716.16
5.4.50.0030.07016.38
5.4.40.0270.04316.34
5.4.30.0370.06016.36
5.4.20.0300.03316.46

preferences:
44.5 ms | 401 KiB | 5 Q