3v4l.org

run code in 300+ PHP versions simultaneously
<?php // wg twojego skryptu leci zwykly tekst $test = "hello <script type=\"text/javascript\"> alert('xds'); </script> \\//\\\\\\ //// "; // kasujemy / \ $removed = str_replace( ['/', '\\'], ['',''], $test ); // jak to wyglada: echo "1.". $test . PHP_EOL; echo "2.". $removed . PHP_EOL; // filtrujemy $cleared = filter_var($removed,FILTER_SANITIZE_STRING); // rezultat echo "3.". $cleared. PHP_EOL; echo json_encode($cleared). PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
1.hello <script type="text/javascript"> alert('xds'); </script> \//\\\ //// 2.hello <script type="textjavascript"> alert('xds'); <script> Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /in/8nvMK on line 13 3.hello alert(&#39;xds&#39;); "hello alert(&#39;xds&#39;); "

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:
19.78 ms | 402 KiB | 8 Q