onlysumitg Posted May 19, 2010 Share Posted May 19, 2010 Hi In object oriented PHP . What is the differnec b/w :: and -> On PHP website documents . They write some methods as mysqli_stmt::prepare ans some as mysqli_stmt->insert_id so whats the difference ?? Thanks Link to comment https://forums.phpfreaks.com/topic/202305-or-in-ooriented-php/ Share on other sites More sharing options...
mattspriggs28 Posted May 19, 2010 Share Posted May 19, 2010 '->' calls a function within a class that has been instantiated. '::' calls a function within a class without the need to create an instance of that class. Link to comment https://forums.phpfreaks.com/topic/202305-or-in-ooriented-php/#findComment-1060827 Share on other sites More sharing options...
onlysumitg Posted May 19, 2010 Author Share Posted May 19, 2010 thanks Link to comment https://forums.phpfreaks.com/topic/202305-or-in-ooriented-php/#findComment-1060832 Share on other sites More sharing options...
Mchl Posted May 19, 2010 Share Posted May 19, 2010 http://www.php.net/manual/en/language.oop5.static.php Link to comment https://forums.phpfreaks.com/topic/202305-or-in-ooriented-php/#findComment-1060837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.