3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $search = "a%' OR 'a'='a "; $sql = "SELECT * FROM caffaine WHERE itemname LIKE '%" . $search . "%' OR itemdesc LIKE '%" . $search . "%' OR categ LIKE '%" . $search . "%'"; echo $sql;
based on qqrLt
Output for 5.6.0 - 5.6.38, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0
SELECT * FROM caffaine WHERE itemname LIKE '%a%' OR 'a'='a %' OR itemdesc LIKE '%a%' OR 'a'='a %' OR categ LIKE '%a%' OR 'a'='a %'