3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 1; if ( preg_match('~^\d{3}$~', "123", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123 if ( preg_match('~^\d{3}$~', "123\n", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123 (et pourtant ce n'est pas la fin de la chaîne) // même comportement si je modifie la séquence de nouvelle ligne par défaut if ( preg_match('~(*CR)^\d{3}$~', "123\r", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123 if ( preg_match('~(*CRLF)^\d{3}$~', "123\r\n", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123 if ( preg_match('~(*NUL)^\d{3}$~', "123\x00", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123 if ( preg_match('~(*ANY)^\d{3}$~', "123\x85", $match) ) echo $i++, ') ', $match[0], PHP_EOL; // 123
Output for git.master, git.master_jit, rfc.property-hooks
1) 123 2) 123 3) 123 4) 123 5) 123 6) 123

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:
167.38 ms | 405 KiB | 5 Q