<?php $numero=123456789; echo array_sum(str_split($numero));
Standard input is empty
45
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!