3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regex = '/^<\S+\s*\S*>[\s\S]*?(?:^<\/\S+>)/m'; $vhost = ' DocumentRoot /www/example2 ServerName www.example.org ErrorLog /var/log/log.txt <Directory> ErrorLog /var/log/log.txt </Directory> <Directory /> ErrorLog /var/log/log.txt </Directory>'; preg_match_all($regex, $vhost, $matches); var_dump($matches);
based on 6dUe1
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { [0]=> array(0) { } }