3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $argv[1] = '-040.010'; $argv[1] = '-0000100.123400000'; #$_=$argv[1];$t=trim('-'==$_[0]?$n=$_=trim($_,'-'):$_,0); $t=trim('-'==($_=$argv[1])[0]?$n=$_=trim($_,'-'):$_,0); $R = explode('.',$t); echo strlen($R[1]).($t!==$_?($n?' -':' ').$t:'');
based on knMov
Output for 7.0.0 - 7.2.0
4 -100.1234
Output for 5.3.22 - 5.6.28
Parse error: syntax error, unexpected '[' in /in/E7vDd on line 7
Process exited with code 255.