3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $delim = '/|:;+-_~'; $esc = join('|', array_map('preg_quote', str_split($delim), str_split(str_repeat(strlen($delim), '~')))); var_dump($esc);
based on IFSD4
Output for 7.0.0 - 7.2.0
Warning: str_repeat() expects parameter 2 to be integer, string given in /in/MCdHO on line 4 string(19) "/|\||\:|;|\+|\-|_|~"
Output for 5.3.22 - 5.6.28
Warning: str_repeat() expects parameter 2 to be long, string given in /in/MCdHO on line 4 string(19) "/|\||\:|;|\+|\-|_|~"