3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $query="DELETE FROM `catalog_package` where id=234; UPDATE `status_history` set status=24 where id between 34 and 231; SELECT mail_id, mail_date, mail_from, mail_to, mail_subject, ( ( SELECT COUNT(*) FROM sys_messagecenter_qmails WHERE qmail_mail_id = mail_id ) + ( SELECT COUNT(*) FROM `sys_messagecenter_rels` WHERE rel_mail_id = mail_id ) ) AS email_total, ( SELECT COUNT(*) FROM `sys_messagecenter_rels` WHERE rel_mail_id = mail_id ) AS email_sent, ( SELECT COUNT(*) FROM `sys_messagecenter_rels` INNER JOIN `sys_email_receives` ON receive_reply_to = rel_sent_id WHERE rel_mail_id = mail_id ) AS email_reply FROM `sys_messagecenter_emails` WHERE mail_draft='No' ORDER BY mail_id ASC LIMIT 0,10;"; if(preg_match_all('/((FROM|JOIN|UPDATE)([\s]+)([a-zA-Z0-9_]+))/', $query, $matches)) { $tables = array_unique($matches[3]); print_r($tables); }
based on j7aoR
Output for 5.3.20 - 7.2.0
Array ( [0] => )