Advertisement
Yousuf1791

Book-page-217

Aug 31st, 2022
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2.  
  3. namespace DatabasePostGRE{
  4.     const CONNECTION_STATUS = 1;
  5.  
  6.     class Connection {
  7.  
  8.     }
  9.  
  10.     function connect(){
  11.         echo "<br>Namespace : ". __NAMESPACE__;
  12.     }
  13.  
  14.     \DatabaseMySQL\connect(); //call connect() from DatabaseMySQL
  15.     connect();               // call connect() from DatabasePostGRE
  16.  
  17. }
  18.  
  19. namespace DatabaseMySQL{
  20.     const CONNECTION_STATUS = 1;
  21.  
  22.     class Connection {
  23.  
  24.     }
  25.  
  26.     function connect(){
  27.         echo "<br>Namespace : ". __NAMESPACE__;
  28.     }
  29. }
  30.  
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement