How to declare functions in PHP? -


i want declare functions without implementations. implementations have in file.

is possible , if so, there tricky in that? common practice so? i'm curious because i'm coming c++.

example:

----------------- declarations.php -----------

<?php  function first($name, $age);  function second($country); ?> 

----------------- implementations.php -----------

<?php  include (declarations.php);  function first($name, $age) {  // here implementation }  function second($country) {  // here other implementation } ?> 

i think want interface, although has implemented in class.

http://php.net/manual/en/language.oop5.interfaces.php

since php scripting language, still have have direct reference implementation include. there no linking stage c++.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -