3v4l.org

run code in 300+ PHP versions simultaneously
<?php $texts = ["Disposizione n. 158 del 28.1.2012", "Disposizione n.66 del 15.1.2006","Disposizione f_n_66 del 15.1.2001", "Disposizione numero 66 del 15.1.2018", "Disposizione nr. 66 del 15.1.2017", "Disposizione nr_66 del 15.1.2016", "Disposizione numero_66 del 15.1.2005"]; foreach ($texts as $text) { if (preg_match('~(?<![^\W_])n(?:r?[_.]|umero_?)\s*\K\d+~i', $text, $match)) { echo $match[0] . " found in '$text'" . PHP_EOL; } else echo "No match in $text!\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
158 found in 'Disposizione n. 158 del 28.1.2012' 66 found in 'Disposizione n.66 del 15.1.2006' 66 found in 'Disposizione f_n_66 del 15.1.2001' 66 found in 'Disposizione numero 66 del 15.1.2018' 66 found in 'Disposizione nr. 66 del 15.1.2017' 66 found in 'Disposizione nr_66 del 15.1.2016' 66 found in 'Disposizione numero_66 del 15.1.2005'

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
25.73 ms | 406 KiB | 5 Q