Reputation: 583
I was trying to do sprintf("<%s>", "Sat");
, but nothing comes out. When you remove the less than symbol, it will start working again. Anyone experience this behavior and whether it expected? as i think it is a bug.
You can even get the same result here with printf..... http://writecodeonline.com/php/
Upvotes: 2
Views: 301
Reputation: 32155
Your browser is probably rendering it as a tag. View source to confirm.
<?php
printf("<%s>", "Sat");
Prints <Sat>
Edit for Yogesh.
<?php
echo sprintf("<%s>", "Sat");
Prints <Sat>
Upvotes: 5
Reputation: 11403
I believe that this happens because <Sat>
is interpreted by your browser as a tag.
Upvotes: 1