3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST['submit'])) { //Connect to Database $db = new PDO('mysql:host=localhost;dbname=dbname;charset=utf8', 'dbuser', 'dbpassword'); //Upload File if (is_uploaded_file($_FILES['filename']['tmp_name'])) { echo "<h2>" . "File ". $_FILES['filename']['name'] ." uploaded successfully." . "</h2>"; } //Import uploaded file to Database $handle = fopen($_FILES['filename']['tmp_name'], "r"); $count =0; while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { $import = $db->exec("INSERT into seoreports (account_name,ranking,alerts,opportunities,pdf_report) values('$data[0]','$data[1]','$data[2]','$data[3]','$data[4]')"); $count++; } fclose($handle); //Print interted rows $msg="<h3 style='color:green;'>".$count. "&nbsp;&nbsp;Rows Imported !</h3>"; } ?> - See more at: http://freewebmentor.com/2014/01/import-csv-file-data-in-mysql.html#sthash.F1Ja1JeG.dpuf

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.0130.01316.63
8.3.50.0100.00917.42
8.3.40.0040.01118.66
8.3.30.0110.01118.55
8.3.20.0080.00018.60
8.3.10.0000.00820.40
8.3.00.0030.00519.25
8.2.180.0070.01016.38
8.2.170.0100.00722.96
8.2.160.0070.01321.05
8.2.150.0070.00024.18
8.2.140.0090.00924.66
8.2.130.0000.00726.16
8.2.120.0050.00319.66
8.2.110.0000.00921.00
8.2.100.0000.01117.91
8.2.90.0030.00620.71
8.2.80.0000.00817.93
8.2.70.0000.00917.63
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00518.16
8.2.30.0000.00718.00
8.2.20.0000.00717.66
8.2.10.0070.00017.76
8.2.00.0050.00317.71
8.1.280.0030.01425.92
8.1.270.0080.00024.66
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00320.83
8.1.230.0080.00320.97
8.1.220.0040.00417.78
8.1.210.0050.00319.01
8.1.200.0060.00317.35
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0040.00418.77
8.1.160.0000.00818.89
8.1.150.0080.00018.61
8.1.140.0070.00017.43
8.1.130.0000.00717.75
8.1.120.0030.00517.49
8.1.110.0070.00017.32
8.1.100.0040.00417.48
8.1.90.0000.00717.39
8.1.80.0030.00417.42
8.1.70.0040.00417.40
8.1.60.0090.00017.54
8.1.50.0060.00317.31
8.1.40.0040.00417.52
8.1.30.0040.00417.51
8.1.20.0000.00817.61
8.1.10.0040.00417.54
8.1.00.0000.00717.47
8.0.300.0040.00419.90
8.0.290.0070.00016.63
8.0.280.0070.00018.46
8.0.270.0000.00817.27
8.0.260.0060.00016.78
8.0.250.0050.00216.96
8.0.240.0080.00016.93
8.0.230.0000.00716.90
8.0.220.0070.00016.92
8.0.210.0040.00416.88
8.0.200.0000.00716.91
8.0.190.0070.00016.91
8.0.180.0040.00416.93
8.0.170.0000.00916.84
8.0.160.0030.00516.84
8.0.150.0040.00416.87
8.0.140.0020.00516.84
8.0.130.0000.00613.33
8.0.120.0070.00016.85
8.0.110.0000.00716.97
8.0.100.0070.00016.84
8.0.90.0050.00216.84
8.0.80.0060.01016.77
8.0.70.0070.00016.72
8.0.60.0000.00816.82
8.0.50.0040.00416.73
8.0.30.0070.01216.97
8.0.20.0130.00716.82
8.0.10.0000.00816.91
8.0.00.0100.00816.67
7.4.330.0000.00512.99
7.4.320.0060.00016.57
7.4.300.0030.00316.39
7.4.290.0040.00816.60
7.4.280.0060.00316.42
7.4.270.0040.00416.48
7.4.260.0000.00513.20
7.4.250.0050.00316.52
7.4.240.0040.00416.40
7.4.230.0030.00316.31
7.4.220.0100.01316.45
7.4.210.0050.01116.59
7.4.200.0040.00416.55
7.4.190.0000.00816.33
7.4.160.0130.01316.57
7.4.150.0110.01816.54
7.4.140.0110.01116.62
7.4.130.0090.00916.43
7.4.120.0100.00616.42
7.4.110.0100.00716.70
7.4.100.0060.01216.44
7.4.90.0070.01516.62
7.4.80.0160.00619.39
7.4.70.0080.00816.35
7.4.60.0060.01316.32
7.4.50.0000.01216.25
7.4.40.0070.00716.17
7.4.30.0120.00316.54
7.4.10.0090.00915.23
7.4.00.0070.00814.77
7.3.330.0000.00613.07
7.3.320.0050.00013.16
7.3.310.0030.00316.09
7.3.300.0030.00316.12
7.3.290.0070.01316.18
7.3.280.0110.00816.25
7.3.270.0040.01416.54
7.3.260.0130.01016.55
7.3.250.0120.00716.42
7.3.240.0100.00716.27
7.3.230.0100.00716.31
7.3.210.0110.00616.18
7.3.200.0090.00716.49
7.3.190.0030.01316.18
7.3.180.0040.01116.34
7.3.170.0070.01316.21
7.3.160.0130.00316.37
7.3.130.0100.00614.41
7.3.120.0040.01114.69
7.3.110.0080.01014.89
7.3.100.0040.01114.64
7.3.90.0050.00914.81
7.3.80.0050.00714.72
7.3.70.0070.00714.53
7.3.60.0030.00814.60
7.3.50.0060.00614.77
7.3.40.0030.00714.77
7.3.30.0050.00514.58
7.3.20.0050.00716.59
7.3.10.0090.00616.49
7.3.00.0020.00816.48
7.2.330.0100.00716.44
7.2.320.0070.01016.59
7.2.310.0070.01516.64
7.2.300.0060.01216.28
7.2.290.0130.00316.67
7.2.260.0030.01415.15
7.2.250.0060.01114.68
7.2.240.0090.00715.14
7.2.230.0080.00814.76
7.2.220.0050.01015.05
7.2.210.0030.00914.87
7.2.200.0070.00614.92
7.2.190.0030.01114.83
7.2.180.0070.00815.05
7.2.170.0100.00314.82
7.2.160.0040.01115.06
7.2.150.0030.00916.84
7.2.140.0040.00816.80
7.2.130.0060.00616.80
7.2.120.0060.00716.60
7.2.110.0070.01016.75
7.2.100.0030.01216.75
7.2.90.0030.00916.68
7.2.80.0070.00916.94
7.2.70.0070.00916.77
7.2.60.0080.00816.89
7.2.50.0070.00716.84
7.2.40.0050.00816.79
7.2.30.0040.01016.84
7.2.20.0080.00716.78
7.2.10.0080.00716.78
7.2.00.0080.00617.59
7.1.330.0050.00815.75
7.1.320.0040.00815.72
7.1.310.0020.01215.66
7.1.300.0050.00715.63
7.1.290.0040.00415.56
7.1.280.0030.00615.63
7.1.270.0060.00815.67
7.1.260.0000.00915.61
7.1.250.0020.00615.46
7.1.240.0110.00415.65
7.1.230.0000.01015.41
7.1.220.0030.01215.67
7.1.210.0090.00615.66
7.1.200.0090.00615.88
7.1.190.0060.00615.41
7.1.180.0080.00615.54
7.1.170.0070.00715.43
7.1.160.0100.00315.51
7.1.150.0000.00815.49
7.1.140.0070.01015.79
7.1.130.0070.00415.51
7.1.120.0100.00715.48
7.1.110.0040.00415.70
7.1.100.0060.00716.85
7.1.90.0100.00315.66
7.1.80.0030.01015.84
7.1.70.0080.00216.31
7.1.60.0070.01017.56
7.1.50.0040.00516.17
7.1.40.0030.00915.70
7.1.30.0060.00915.60
7.1.20.0030.00715.70
7.1.10.0020.00715.84
7.1.00.0050.03019.14
7.0.330.0050.00515.23
7.0.320.0030.00615.02
7.0.310.0070.00715.51
7.0.300.0040.00815.44
7.0.290.0070.00415.39
7.0.280.0030.01415.45
7.0.270.0080.00415.43
7.0.260.0030.00915.49
7.0.250.0090.00915.11
7.0.240.0030.01015.43
7.0.230.0090.00415.28
7.0.220.0030.00915.35
7.0.210.0130.00015.46
7.0.200.0060.00316.07
7.0.190.0030.01015.04
7.0.180.0030.01015.22
7.0.170.0040.00815.23
7.0.160.0000.01515.46
7.0.150.0050.00515.06
7.0.140.0050.04018.65
7.0.130.0100.00015.08
7.0.120.0050.04218.60
7.0.110.0100.00715.39
7.0.100.0000.01415.42
7.0.90.0030.01215.41
7.0.80.0000.01215.39
7.0.70.0100.00315.25
7.0.60.0070.04717.50
7.0.50.0000.03516.58
7.0.40.0080.03015.47
7.0.30.0050.04415.45
7.0.20.0070.04515.53
7.0.10.0030.04315.54
7.0.00.0080.04115.52
5.6.400.0100.00014.46
5.6.390.0060.00814.41
5.6.380.0000.01014.25
5.6.370.0070.00714.18
5.6.360.0040.01214.23
5.6.350.0040.01114.07
5.6.340.0100.01014.50
5.6.330.0000.01414.46
5.6.320.0060.00314.24
5.6.310.0090.00014.59
5.6.300.0070.00714.63
5.6.290.0070.00714.14
5.6.280.0080.03517.70
5.6.270.0000.01314.25
5.6.260.0000.01514.25
5.6.250.0030.01014.31
5.6.240.0070.00414.12
5.6.230.0080.00514.17
5.6.220.0100.00314.13
5.6.210.0000.03117.49
5.6.200.0070.04216.09
5.6.190.0010.05016.37
5.6.180.0050.03316.23
5.6.170.0020.03216.28
5.6.160.0050.04516.27
5.6.150.0050.02816.24
5.6.140.0120.03716.20
5.6.130.0050.03816.23
5.6.120.0030.03616.16
5.6.110.0070.02316.18
5.6.100.0120.01816.29
5.6.90.0030.02516.21
5.6.80.0120.02715.86
5.6.70.0050.02315.97
5.6.60.0050.02315.96
5.6.50.0030.02215.78
5.6.40.0060.01916.04
5.6.30.0080.01815.96
5.6.20.0050.02315.82
5.6.10.0030.02515.73
5.6.00.0050.02215.85
5.5.380.0070.00714.04
5.5.370.0040.00413.88
5.5.360.0000.01114.14
5.5.350.0170.03217.49
5.5.340.0050.03015.92
5.5.330.0110.04116.15
5.5.320.0080.04516.15
5.5.310.0110.04116.00
5.5.300.0020.04315.97
5.5.290.0090.04315.93
5.5.280.0100.02416.09
5.5.270.0030.02515.97
5.5.260.0030.02515.99
5.5.250.0030.03016.01
5.5.240.0020.02915.62
5.5.230.0030.02315.77
5.5.220.0020.02615.76
5.5.210.0040.02115.68
5.5.200.0020.02215.84
5.5.190.0070.02215.77
5.5.180.0050.02115.78
5.5.170.0040.01114.25
5.5.160.0060.02015.61
5.5.150.0040.02315.64
5.5.140.0040.02015.76
5.5.130.0020.02615.70
5.5.120.0060.02015.60
5.5.110.0090.01715.53
5.5.100.0050.02215.54
5.5.90.0050.02415.60
5.5.80.0040.02415.69
5.5.70.0080.01815.70
5.5.60.0030.02315.72
5.5.50.0050.03215.71
5.5.40.0020.03215.62
5.5.30.0070.02715.53
5.5.20.0100.03815.65
5.5.10.0050.02715.61
5.5.00.0110.02615.57
5.4.450.0050.04315.81
5.4.440.0030.02515.74
5.4.430.0020.02915.74
5.4.420.0030.02515.66
5.4.410.0030.02115.60
5.4.400.0000.02415.59
5.4.390.0060.03815.58
5.4.380.0020.02215.58
5.4.370.0030.04015.49
5.4.360.0030.02315.58
5.4.350.0040.02215.58
5.4.340.0060.01815.62
5.4.330.0030.01012.18
5.4.320.0050.02015.53
5.4.310.0050.02215.58
5.4.300.0050.02015.58
5.4.290.0110.01515.60
5.4.280.0020.02215.58
5.4.270.0000.02315.69
5.4.260.0050.02015.50
5.4.250.0040.02515.64
5.4.240.0000.02515.63
5.4.230.0020.02015.60
5.4.220.0120.02915.69
5.4.210.0030.04015.63
5.4.200.0100.03815.58
5.4.190.0030.03415.60
5.4.180.0100.02815.49
5.4.170.0070.04215.63
5.4.160.0030.03015.52
5.4.150.0080.03715.62
5.4.140.0020.03214.24
5.4.130.0070.03814.23
5.4.120.0020.04014.23
5.4.110.0050.04114.31
5.4.100.0130.03314.22
5.4.90.0050.02814.20
5.4.80.0070.03814.39
5.4.70.0030.02514.26
5.4.60.0050.03614.19
5.4.50.0100.04014.25
5.4.40.0070.02314.29
5.4.30.0120.03514.21
5.4.20.0070.02414.22
5.4.10.0090.03514.23
5.4.00.0070.01913.90
5.3.290.0030.02113.41
5.3.280.0050.02813.38
5.3.270.0030.02813.37
5.3.260.0100.03813.39
5.3.250.0080.03913.31
5.3.240.0060.04313.33
5.3.230.0050.03013.28
5.3.220.0050.02913.35
5.3.210.0130.01813.29
5.3.200.0070.04013.29
5.3.190.0100.03413.29
5.3.180.0070.03513.36
5.3.170.0030.03613.33
5.3.160.0050.04013.41
5.3.150.0100.04013.34
5.3.140.0060.03013.36
5.3.130.0020.04813.35
5.3.120.0120.03513.34
5.3.110.0090.03513.35
5.3.100.0070.03713.07
5.3.90.0050.02713.07
5.3.80.0050.02513.03
5.3.70.0030.04313.03
5.3.60.0020.04213.07
5.3.50.0100.03513.03
5.3.40.0050.02713.03
5.3.30.0020.04113.03
5.3.20.0040.02012.91
5.3.10.0020.04012.90
5.3.00.0030.03712.84
5.2.170.0030.03710.93
5.2.160.0100.02711.13
5.2.150.0030.06310.99
5.2.140.0070.06311.29
5.2.130.0100.02711.11
5.2.120.0100.05711.05
5.2.110.0030.05311.11
5.2.100.0100.04011.09
5.2.90.0000.04011.11
5.2.80.0170.05311.08
5.2.70.0030.06311.13
5.2.60.0030.05711.21
5.2.50.0030.04010.95
5.2.40.0070.05710.97
5.2.30.0100.03010.95
5.2.20.0070.05010.93
5.2.10.0000.04010.89
5.2.00.0030.03010.71
5.1.60.0070.0279.99
5.1.50.0130.02310.04
5.1.40.0030.03010.06
5.1.30.0030.05710.38
5.1.20.0070.05010.40
5.1.10.0070.03010.02
5.1.00.0030.05010.02
5.0.50.0030.0379.08
5.0.40.0000.0479.08
5.0.30.0070.0579.08
5.0.20.0000.0409.08
5.0.10.0000.0279.08
5.0.00.0100.0509.08
4.4.90.0030.0309.08
4.4.80.0000.0239.08
4.4.70.0100.0209.08
4.4.60.0130.0279.08
4.4.50.0030.0239.08
4.4.40.0130.0379.08
4.4.30.0030.0379.08
4.4.20.0030.0209.08
4.4.10.0170.0179.08
4.4.00.0230.0409.08
4.3.110.0030.0379.08
4.3.100.0130.0279.08
4.3.90.0030.0339.08
4.3.80.0000.0409.08
4.3.70.0070.0339.08
4.3.60.0070.0309.08
4.3.50.0000.0339.08
4.3.40.0000.0409.08
4.3.30.0000.0309.08
4.3.20.0000.0379.08
4.3.10.0000.0379.08
4.3.00.0000.0379.08

preferences:
39.4 ms | 401 KiB | 5 Q