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('1/99'));
based on ZNJco
Output for 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
toto tutu1970-01
Output for 4.3.0 - 5.0.5
toto tutu2014-04