Multiple choice technology web technology

  1. The following piece of script will output: $email=’[email protected]’; $new=strstr($email, ‘@’ print $new; ?>

  1. admin

  2. admin@psexam

  3. @psexam.com

  4. psexam.com

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The PHP function strstr() searches for a substring within a string and returns the portion from the first occurrence to the end. Given $email = '[email protected]' and searching for '@', strstr() returns '@psexam.com' - everything from the '@' character onwards. Option A is wrong because strstr() returns from the search character, not before it. Option B incorrectly includes part before the '@'. Option D returns only the part after '@', which would require substr() or string manipulation, not strstr().