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('1999-1'));
based on IJiLJ
Output for 5.0.0 - 5.0.5, 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
toto tutu1999-01
Output for 5.1.0 - 5.1.6
toto tutu1999-10
Output for 4.3.0 - 4.4.9
toto tutu1970-01