Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $var = 8;
- // Inline variable parsing
- echo "I'd like {$var} mangoes"; // = "I'd like 8 mangoes
- // String concatenation
- echo "I'd like ".$var." mangoes"; // I'd like 8 mangoes
- // Explicit cast
- $items = (string)$var; // $items === "8";
- // Function call
- $items = strval($var); // $items === "8";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement