3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_POST['submit']) && isset($_POST['titel']) && isset($_POST['trainer']) && isset($_POST['ort'])&& isset($_POST['dauer']) && $_POST['titel'] != '' && $_POST['trainer'] != '' && $_POST['ort'] != '' && (int)$_POST['dauer'] > 0) { try $db = new MySQLi('localhost', 'root', '', 'php'); echo 'Verbindung offen.<br />'; $sql = 'INSERT INTO trainings (titel, trainer, ort, dauer) VALUES (?, ?, ?, ?)'; $kommando = $db->prepare($sql); $kommando->bind_param('sssi', $_POST['titel'], $_POST['trainer'], $_POST['ort'], $dauer); $dauer = (int)$_POST['dauer']; $kommando->execute(); echo 'SQL geschickt. <br />'; echo $kommando->affected_rows . ' Zeilen betroffen. <br />'; $db->close(); echo 'Verbindung zu.<br />'; } catch (Exception $e) { echo 'Fehler: ' . htmlspecialchars($e->getMessage()); } } ?>

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)
5.4.180.0080.03412.38
5.4.170.0180.04012.37
5.4.160.0230.03612.37
5.4.150.0140.04512.36
5.4.140.0150.04312.05
5.4.130.0150.04312.03
5.4.120.0170.03912.00
5.4.110.0320.08512.00
5.4.100.0140.04411.99
5.4.90.0100.04711.99
5.4.80.0170.04211.99
5.4.70.0170.04511.99
5.4.60.0170.04511.99
5.4.50.0140.04511.99
5.4.40.0150.04311.98
5.4.30.0150.04511.97
5.4.20.0160.04711.96
5.4.10.0170.04211.97
5.4.00.0190.06911.46
5.3.270.0310.09812.72
5.3.260.0140.05012.72
5.3.250.0200.04612.72
5.3.240.0200.04312.72
5.3.230.0240.04112.71
5.3.220.0180.04512.68
5.3.210.0150.04612.68
5.3.200.0140.04612.68
5.3.190.0260.06612.68
5.3.180.0130.04612.67
5.3.170.0330.05712.67
5.3.160.0180.04112.68
5.3.150.0210.03812.68
5.3.140.0140.04612.66
5.3.130.0190.04512.66
5.3.120.0170.04912.66
5.3.110.0180.04612.65
5.3.100.0210.06912.11
5.3.90.0160.04212.08
5.3.80.0110.04812.08
5.3.70.0160.04412.08
5.3.60.0180.04212.06
5.3.50.0180.04312.00
5.3.40.0160.04412.00
5.3.30.0180.04011.95
5.3.20.0180.04111.73
5.3.10.0270.05911.69
5.3.00.0190.04211.67

preferences:
134.44 ms | 1394 KiB | 7 Q