Is it correct to say function? |
I am new to CI and PHP. I am studying
https://codeigniter.com/user_guide/libra...onfig.html There are two ways to load a config file: Manual Loading To load one of your custom config files you will use the following function within the controller that needs it: We know when we call by object it is called a method, however the above line used the term function , Why?
A "method" is a "function" that belongs to a class. Though "method" would be a more precise description either term is correct.
Keep in mind that a class method is defined using the keyword "function", e.g. PHP Code: <?php
(02-21-2020, 07:43 PM)dave friend Wrote: A "method" is a "function" that belongs to a class. Though "method" would be a more precise description either term is correct. Thank you so much! |
Welcome Guest, Not a member yet? Register Sign In |