- substr: documentation ( source)
- var_dump: documentation ( source)
- stristr: documentation ( source)
<?php
$url = '';
$i = 0;
$result = 'good';
while ( stristr( $url, 'http' ) !== $url ) {
$url = substr( $url, 1 );
$i++;
if ( $i > 256 ) {
$result = 'bad';
}
}
var_dump( $result );