3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db= new class{ public function real_escape_string(string $str):string{return $str;} }; $db=new $db; //var_dump($db); $search='Samsung Galaxy A7 (2017) 32gb'; $split=preg_split('/\s+/u',$search); $query='SELECT * FROM tbl WHERE '; foreach($split as $str){ $query.='`name` LIKE \'%'.$db->real_escape_string($str).'%\' AND '; } $query=substr($query,0,-strlen(' AND ')); var_dump($query);
Output for git.master, git.master_jit, rfc.property-hooks
string(149) "SELECT * FROM tbl WHERE `name` LIKE '%Samsung%' AND `name` LIKE '%Galaxy%' AND `name` LIKE '%A7%' AND `name` LIKE '%(2017)%' AND `name` LIKE '%32gb%'"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
170.82 ms | 405 KiB | 5 Q