3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <?php global $db; $sqliteerror = null; try{ $db = new PDO('sqlite:mysqlitedb.sqlite3'); } catch(Exception $e){ echo htmlentities($e->getMessage()); echo "<br><br><br>"; die('Error opening or creating new sqlite DB. Check write permissions for '.dirname(__FILE__)); } //Save if(isset($_POST['answer']) && trim($_POST['answer'])){ $sql = 'INSERT INTO survey (answer) VALUES (\''.$_POST['answer'].'\')'; $db->query($sql); } ?> <html> <head> <title></title> </head> <body> <fieldset> <legend>SURVEY: What is the best food?</legend> <form method="POST"> <label>Answer: <input type="text" name="answer"></label> <input type="submit"> </form> </fieldset> <fieldset> <legend>SURVEY: Previous Answers</legend> <?php $sql = 'SELECT COUNT(*) as x, `answer` FROM survey WHERE `answer` != \'\' GROUP BY `answer`'; foreach ($db->query($sql) as $row) { echo $row['x'] . "x ".$row['answer'].'<br>'; } ?> </fieldset> </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.40.0080.00818.74
8.3.30.0060.01318.84
8.3.20.0000.00821.96
8.3.10.0030.00619.19
8.3.00.0040.00421.89
8.2.170.0070.01122.96
8.2.160.0120.00622.16
8.2.150.0000.00724.18
8.2.140.0090.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00026.16
8.2.110.0060.00320.35
8.2.100.0070.00417.78
8.2.90.0000.00817.84
8.2.80.0060.00317.97
8.2.70.0050.00317.63
8.2.60.0030.00617.63
8.2.50.0000.00719.21
8.2.40.0030.00621.07
8.2.30.0040.00420.46
8.2.20.0030.00617.97
8.2.10.0080.00019.07
8.2.00.0050.00319.90
8.1.270.0030.00522.53
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00322.59
8.1.230.0070.00422.81
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0030.00617.22
8.1.180.0060.00318.10
8.1.170.0050.00318.50
8.1.160.0000.00718.92
8.1.150.0070.00018.73
8.1.140.0070.00020.36
8.1.130.0020.00420.34
8.1.120.0050.00317.34
8.1.110.0030.00617.34
8.1.100.0030.00717.36
8.1.90.0070.00017.45
8.1.80.0050.00217.41
8.1.70.0030.00317.48
8.1.60.0000.00817.61
8.1.50.0000.00817.64
8.1.40.0000.00917.66
8.1.30.0040.00417.74
8.1.20.0000.00817.68
8.1.10.0100.00017.53
8.1.00.0000.00817.62
8.0.300.0070.00019.99
8.0.290.0000.00716.75
8.0.280.0040.00418.48
8.0.270.0040.00417.21
8.0.260.0000.00718.47
8.0.250.0070.00016.96
8.0.240.0030.00317.06
8.0.230.0000.00816.89
8.0.220.0070.00016.90
8.0.210.0020.00516.93
8.0.200.0040.00417.06
8.0.190.0030.00617.04
8.0.180.0000.00717.02
8.0.170.0000.00917.03
8.0.160.0040.00416.95
8.0.150.0040.00416.94
8.0.140.0030.00316.88
8.0.130.0050.00013.86
8.0.120.0010.00615.41
8.0.110.0040.00315.33
8.0.100.0020.00515.24
8.0.90.0010.00515.35
8.0.80.0040.00615.34
8.0.70.0010.00515.25
8.0.60.0010.00515.38
8.0.50.0020.00515.29
8.0.30.0070.00715.38
8.0.20.0060.00915.48
8.0.10.0000.01015.47
8.0.00.0100.00816.04
7.4.330.0060.00015.55
7.4.320.0070.00016.38
7.4.300.0000.00616.54
7.4.290.0060.00416.61
7.4.280.0040.00416.45
7.4.270.0070.00016.53
7.4.260.0040.00416.65
7.4.250.0100.00115.14
7.4.240.0040.00715.18
7.4.230.0080.00315.23
7.4.220.0040.00615.18
7.4.210.0070.00715.90
7.4.200.0060.00315.20
7.4.190.0090.00313.81
7.4.180.0080.00413.83
7.4.160.0090.00816.01
7.4.150.0130.00013.85
7.4.140.0060.01115.87
7.4.130.0140.00415.19
7.4.120.0050.01215.13
7.4.110.0080.00615.18
7.4.100.0090.00615.13
7.4.90.0120.00515.23
7.4.80.0120.00416.52
7.4.70.0120.00315.28
7.4.60.0110.00415.02
7.4.50.0020.01115.16
7.4.40.0090.00615.14
7.4.30.0090.00313.71
7.4.20.0060.00613.71
7.4.10.0080.00413.70
7.4.00.0100.00414.29
7.3.330.0000.00613.49
7.3.320.0100.00213.52
7.3.310.0040.00614.84
7.3.300.0060.00414.93
7.3.290.0080.00214.78
7.3.280.0120.00515.30
7.3.270.0100.00313.43
7.3.260.0100.00715.92
7.3.250.0080.00513.36
7.3.240.0040.00913.46
7.3.230.0100.00414.98
7.3.220.0080.00413.41
7.3.210.0100.00714.96
7.3.200.0110.00515.06
7.3.190.0130.00215.03
7.3.180.0130.00115.08
7.3.170.0070.00714.96
7.3.160.0070.00714.92
7.3.150.0100.00313.41
7.3.140.0000.01213.41
7.3.130.0080.00413.45
7.3.120.0100.00213.41
7.3.110.0030.01013.40
7.3.100.0060.00613.27
7.3.90.0130.00013.66
7.3.80.0090.00413.52
7.3.70.0040.00913.66
7.3.60.0080.00413.84
7.3.50.0090.00514.19
7.3.40.0110.00314.16
7.3.30.0080.00714.13
7.3.20.0100.00815.10
7.3.10.0150.00515.13
7.3.00.0080.00615.04
7.2.340.0120.00013.48
7.2.330.0050.01115.32
7.2.320.0080.00715.18
7.2.310.0100.00515.15
7.2.300.0080.00715.11
7.2.290.0110.00615.11
7.2.280.0090.00413.45
7.2.270.0060.00613.48
7.2.260.0060.00613.57
7.2.250.0100.00313.51
7.2.240.0040.00913.63
7.2.230.0070.00513.46
7.2.220.0090.00413.48
7.2.210.0090.00413.48
7.2.200.0110.00313.72
7.2.190.0100.00313.75
7.2.180.0150.00314.38
7.2.170.0120.00614.51
7.2.160.0090.00314.50
7.2.150.0130.00515.26
7.2.140.0140.00015.27
7.2.130.0110.00715.29
7.2.120.0170.00215.48
7.2.110.0070.00915.35
7.2.100.0130.00215.34
7.2.90.0520.00315.30
7.2.80.0130.00815.45
7.2.70.0120.00815.29
7.2.60.0090.00915.44
7.2.50.0120.00715.33
7.2.40.0090.00615.48
7.2.30.0310.00215.40
7.2.20.0110.00415.45
7.2.10.0110.00415.35
7.2.00.0120.00615.47
7.1.330.0090.00314.42
7.1.320.0130.00014.41
7.1.310.0100.00314.41
7.1.300.0120.00014.48
7.1.290.0100.00314.54
7.1.280.0150.00314.30
7.1.270.0090.00514.20
7.1.260.0100.00314.15
7.1.250.0090.00414.12
7.1.240.0120.00014.48
7.1.230.0100.00314.45
7.1.220.0100.00314.32
7.1.210.0110.00314.47
7.1.200.0090.00314.47
7.1.190.0100.00314.46
7.1.180.0120.00014.48
7.1.170.0080.00414.45
7.1.160.0060.00614.49
7.1.150.0120.00014.24
7.1.140.0120.00014.39
7.1.130.0100.00314.28
7.1.120.0060.00414.22
7.1.110.0090.00014.11
7.1.100.0080.00014.39
7.1.90.0100.00014.54
7.1.80.0000.00914.48
7.1.70.0060.00314.29
7.1.60.0060.00314.45
7.1.50.0040.00414.40
7.1.40.0060.00314.49
7.1.30.0050.00514.48
7.1.20.0090.00014.24
7.1.10.0060.00314.34
7.1.00.0020.00714.60

preferences:
61.73 ms | 400 KiB | 5 Q