3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $urlKey = 'ftrcvgbhnjk-2000-4628-20.html'; if ($result = preg_match('/-\d+-(\d+)\.html.*$/', $urlKey, $matches)) { $result = $matches[1]; } echo $result; var_dump($matches); echo $oldUrlKey;
Output for 5.0.4 - 7.1.0
20array(2) { [0]=> string(13) "-4628-20.html" [1]=> string(2) "20" } Notice: Undefined variable: oldUrlKey in /in/J7k0P on line 12
Output for 4.3.0 - 5.0.3
20array(2) { [0]=> string(13) "-4628-20.html" [1]=> string(2) "20" } Notice: Undefined variable: oldUrlKey in /in/J7k0P on line 12