Question from the PHP7 test

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

Hard

Does this code make sense?

<?php

function hasResult($string, $search){
    return strpos($string, $search)!== false;
}
Author: AdrienStatus: Published(Update)Question passed 17 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!