3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-type: text/html; charset=UTF-8'); function verificaNumero( $numero = null) { if( !is_null( $numero ) && preg_match('/^((\d+)((\.|,)\d+)?)$/', $numero) ) { $numero = preg_replace('/,/sim', '.', $numero); echo $numero . PHP_EOL; } else echo 'Não passou' . PHP_EOL; } verificaNumero(10); verificaNumero(10.11); verificaNumero('10,12'); verificaNumero('String'); verificaNumero('a123');
Output for git.master, git.master_jit, rfc.property-hooks
10 10.11 10.12 Não passou Não passou

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:
50.91 ms | 401 KiB | 8 Q