3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input_zwsp_utf8 = "\xE2\x80\x8B"; echo "Binary mode: match three bytes\n-----\n"; echo "in: $input_zwsp_utf8--\nhex: ".bin2hex($input_zwsp_utf8)."\n"; $output = preg_replace('/\xE2\x80\x8B/', '', $input_zwsp_utf8); echo "out: $output--\nhex: ".bin2hex($output)."\n\n"; echo "UTF-8 mode: match a Unicode code point\n-----\n"; echo "in: $input_zwsp_utf8--\nhex: ".bin2hex($input_zwsp_utf8)."\n"; $output = preg_replace('/\x{200B}/u', '', $input_zwsp_utf8); echo "out: $output--\nhex: ".bin2hex($output)."\n\n";

preferences:
35.1 ms | 405 KiB | 5 Q