3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('/([0-9]3)-([0-9]3)-([0-9]4)/', "TEL 323-555-1212", $matches); echo $matches.lenght; var_dump($matches);
based on DvOVq
Output for 7.2.0
Warning: Use of undefined constant lenght - assumed 'lenght' (this will throw an Error in a future version of PHP) in /in/MKJbv on line 3 Notice: Array to string conversion in /in/MKJbv on line 3 Arraylenghtarray(0) { }
Output for 5.4.10 - 7.1.10
Notice: Use of undefined constant lenght - assumed 'lenght' in /in/MKJbv on line 3 Notice: Array to string conversion in /in/MKJbv on line 3 Arraylenghtarray(0) { }
Output for 5.3.20 - 5.3.29
Notice: Use of undefined constant lenght - assumed 'lenght' in /in/MKJbv on line 3 Arraylenghtarray(0) { }