3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fieldname = "<script language='JavaScript' type='text/javascript'> <!-- var prefix = 'mailto:'; var suffix = ''; var attribs = ''; var path = 'hr' 'ef' '='; var addy22804 = 'justinleegould' '@'; addy22804 = addy22804 'gmail' '.' 'com'; document.write( '<a ' path '\'' prefix addy22804 suffix '\'' attribs '>' ); document.write( addy22804 ); document.write( '<\/a>' ); //--> </script><script language='JavaScript' type='text/javascript'> <!-- document.write( '<span style=\'display: none;\'>' ); //--> </script>This e-mail address is being protected from spambots. You need JavaScript enabled to view it <script language='JavaScript' type='text/javascript'> <!-- document.write( '</' ); document.write( 'span>' ); //--> </script>"; $start = strpos($fieldname, "var path = 'hr'"); $end = strpos($fieldname, "document.write"); $fieldname = substr($fieldname, $start, $end - $start); $fieldname = substr($fieldname, strpos($fieldname, "var", 1)); echo $fieldname; /* strrpos — Find the position of the last occurrence of a substring in a string int strrpos ( string $haystack , string $needle [, int $offset = 0 ] ) Find the numeric position of the last occurrence of needle in the haystack string. strpos — Find the position of the first occurrence of a substring in a string mixed strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) string substr ( string $string , int $start [, int $length ] ) Returns the portion of string specified by the start and length parameters. */ ?>

preferences:
36.25 ms | 402 KiB | 5 Q