3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = 'hello my'; $search = explode(' ', $search); $query = "SELECT * FROM table WHERE string LIKE '%" . implode("%' OR string LIKE '%", $search) . "%'"; echo $query . "\n"; $query = "SELECT * FROM table WHERE string LIKE '%" . implode("%' AND string LIKE '%", $search) . "%'"; echo $query;

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
242.72 ms | 3371 KiB | 12 Q