3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sentences = [ 'India is great country.', 'Indiana is great state.', 'I have worked in India.', 'India-based research.', 'India78 is not very strong password.' ]; $search = "India"; foreach ($sentences as $sentence) { var_dump(preg_match("/\b$search\b/i", $sentence)); }
based on vSLQo
Output for 5.4.0 - 7.1.7
int(1) int(0) int(1) int(1) int(0)