3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = 'toto tutu 1.3 tdfs fdsfds fdsfsd'; preg_match('/^[^0-9]+/', $t, $matches); echo trim($matches[0]); echo date('Y-m', strtotime('99-1'));
based on UaUcL
Output for 4.3.0 - 4.4.9, 5.1.0 - 7.1.0
toto tutu1970-01
Output for 5.0.0 - 5.0.5
toto tutu1999-01