3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $urlKey = 'ftrcvgbhnjk-2000-4628-20.html'; $oldUrlKey = null; if (preg_match('/^.*-[0-9]+(-[0-9]+)\.html$/', $urlKey, $matches)) { $oldUrlKey = str_replace($matches[1], '', $urlKey); $index[$oldUrlKey] = $data; } echo $oldUrlKey;
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: data in /in/sMkcb on line 6 ftrcvgbhnjk00-4628.html
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: data in /in/sMkcb on line 6 ftrcvgbhnjk00-4628.html