Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class base{
- function sum(int $value){ //only integer value can be passed here
- echo $value + 1;
- }
- }
- $obj = new base();
- $obj->sum("10");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement