3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $query = "SELECT r.revision_id, r.content_id, r.user_id, r.entry_name, r.entry_description, r.date_added, r.date_modified FROM modules_acls_entries_content_revisions r INNER JOIN modules_acls_entries_content c ON (c.content_id = r.content_id) WHERE r.revision_id = ?;"; if(preg_match_all('/((FROM|JOIN|INNER JOIN) (.*))/', $query, $matches)) { print_r($matches); // $tables = array_unique($matches[3]); // print_r($tables); }
based on ZPsWP
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Array ( [0] => Array ( [0] => FROM modules_acls_entries_content_revisions r INNER JOIN modules_acls_entries_content c ON (c.content_id = r.content_id) WHERE r.revision_id = ?; ) [1] => Array ( [0] => FROM modules_acls_entries_content_revisions r INNER JOIN modules_acls_entries_content c ON (c.content_id = r.content_id) WHERE r.revision_id = ?; ) [2] => Array ( [0] => FROM ) [3] => Array ( [0] => modules_acls_entries_content_revisions r INNER JOIN modules_acls_entries_content c ON (c.content_id = r.content_id) WHERE r.revision_id = ?; ) )