3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $event_types = array('ea', 'ec'); $type_count = count($event_types); $evtypes = rtrim(str_repeat('?,', $type_count), ','); $query = <<<QUERY DELETE FROM events WHERE evtype IN({$evtypes}) AND cameraid = ? AND endtime < ? QUERY; $params['types'] = str_repeat('s', $type_count) . 'si'; $params += $event_types; $params[] = $deviceid; $params[] = $oldest_actual_event_starttime; var_export($params);
Output for 5.0.4 - 5.1.1, 5.1.3 - 7.1.0
Notice: Undefined variable: deviceid in /in/S1Pv8 on line 18 Notice: Undefined variable: oldest_actual_event_starttime in /in/S1Pv8 on line 19 array ( 'types' => 'sssi', 0 => 'ea', 1 => 'ec', 2 => NULL, 3 => NULL, )
Output for 5.1.2
Notice: Undefined variable: deviceid in /in/S1Pv8 on line 19 Notice: Undefined variable: oldest_actual_event_starttime in /in/S1Pv8 on line 20 array ( 'types' => 'sssi', 0 => 'ea', 1 => 'ec', 2 => NULL, 3 => NULL, )
Output for 4.3.0 - 4.4.1, 4.4.3 - 5.0.3
Notice: Undefined variable: deviceid in /in/S1Pv8 on line 18 Notice: Undefined variable: oldest_actual_event_starttime in /in/S1Pv8 on line 19 array ( 'types' => 'sssi', 0 => 'ea', 1 => 'ec', 2 => NULL, 3 => NULL, )
Output for 4.4.2
Notice: Undefined variable: deviceid in /in/S1Pv8 on line 19 Notice: Undefined variable: oldest_actual_event_starttime in /in/S1Pv8 on line 20 array ( 'types' => 'sssi', 0 => 'ea', 1 => 'ec', 2 => NULL, 3 => NULL, )