Guest User

Untitled

a guest
Sep 14th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. If non-static method can be static without any bad impact on code?
  2. class student{
  3.  
  4. public static function getStudentName($studentID){
  5. ....
  6. return $studentName;
  7.  
  8. }
  9.  
  10. }
  11.  
  12. $stuName = student::getStudentName($stuID)
  13.  
  14. $instance = student::find($id);
  15. $name = $instance->name();
  16.  
  17. $name = student::find_and_return_the_name($id);
Add Comment
Please, Sign In to add comment