3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $alternative = 'offer_type:buy'; $key = 'category:apartment__location_region:shan-south__offer_type:buy'; $result['key'] = 'category:apartment__offer_type:buy_my'; $keyExactMatch = !!array_intersect( array($key, $alternative), array($result['key'], substr($result['key'], null, -3)) ); var_dump($keyExactMatch);
Output for 4.3.0 - 7.2.0
bool(false)