3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = array(); $row['title'] = 'Mr Smith'; $row['surname'] = 'Smith'; if ( isset($row['title']) && isset($row['surname']) ) { if ( '' !== trim($row['title']) && '' !== trim($row['surname']) ) { $titleParts = explode(' ',$row['title']); if ( count($titleParts) > 1 ) { if ( -1 !== strpos($row['title'],$row['surname']) ) { echo 'yay'; } } } }

preferences:
41.66 ms | 402 KiB | 5 Q