Question from the PHP7 test

Write a function that checks if a string contains a substring.

Medium

Does this code make sense?

<?php

function hasResult($string, $search){
    return strpos($string, $search) != false;
}
Author: Julien BreuxStatus: PublishedQuestion passed 1112 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!