<?php var_dump(substr("100041", 1, 4));
Standard input is empty
string(4) "0004"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!