<?phpfscanf(STDIN,"%d\n",$i);$r=str_split($i);$a=count($r);if($i<0){$r[1]=-$r[1];array_shift($r);}$b=implode('+',$r);$c=array_sum($r);$d=$a+$c+$i;echo"$i+$a+($b)=$d";
-123
-123+4+(-1+2+3)=-115
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!