3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $timePeriods = array( 'weekly' => 1, 'fortnightly' => 2, 'fourweekly' => 4, 'bianually' => 26, 'anually' => 52 ); $periods = array_keys($timePeriods); $recordName = 'ni_fortweekly_earning_limit'; $a = preg_match('(' . implode('|', $periods) . ')', $recordName); var_dump($a);
based on vjL3T
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
int(1)
Output for hhvm-3.10.0

Process exited with code 153.