strstr() function is used to find the first occurrence of a substring within a string, return the part of the string.

<?php
$var_string = "Hello, world!";
$result = strstr($var_string, "world");
echo $result; 
?>

 Output: world!