3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $methods = array( 'POST', 'GET', 'POST', 'OPTIONS', 'TRACE', 'HEAD', 'OPTIONS', 'OPTIONS', 'OPTIONS', 'PATCH', 'DELETE', ); $matched_methods = array(); foreach ($methods as $method) { if (strcasecmp($method, 'POST') === 0 || strcasecmp($method, 'GET') === 0 || strcasecmp($method, 'OPTIONS') === 0) { $matched_methods[] = $method; } }
Output for 4.3.0 - 7.1.0