<?php$a = '1';$b = '2';$c = (int)$a + (int)$b;var_dump($c);
Standard input is empty
int(3)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!