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 1095 times
Edit
1
Community Evaluations
developer avatar
Estelle
25/06/2023
la formulation de la question est trĂšs subjective...
developer avatar
Auteur anonyme
22/12/2023
Je trouve aussi