3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array( '/category/arts_and_entertainment' => 'Arts And Entertainment', '/category/arts_and_entertainment/animation_and_comics' => 'Animation And Comics', '//twitter.com/share' => 'Tweet', '/website/mangafox.me' => 'Mangafox.me', '/website/mangareader.net' => 'Mangareader.net' ); $vals = array_intersect_key( $array, array_flip( preg_grep( '/^\/website\//', array_keys( $array ) ) ) ); echo "<pre>"; print_r($vals);exit;
Output for 5.5.0 - 7.3.1
<pre>Array ( [/website/mangafox.me] => Mangafox.me [/website/mangareader.net] => Mangareader.net )