Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,562 questions

52,727 answers

573 users

What are the list of special constants in PHP

1 Answer

0 votes
echo "current line number: " . __LINE__ . "<br />";
echo "full path and filename: " . __FILE__ . "<br />";
echo "directory of the file: " . __DIR__ . "<br />";
echo "directory of the file: " .  dirname(__FILE__) . "<br />";
echo "current function name :" . __FUNCTION__ . "<br />";
echo "class name: " . __CLASS__ . "<br />";
echo "trait name includes the namespace it was declared: " . __TRAIT__ . "<br />";
echo "class method name: " . __METHOD__ . "<br />";
echo "current namespace name: " . __NAMESPACE__ . "<br />";


  
/*
run:
   
current line number: 8
full path and filename: C:\xampp\htdocs\answersmind.com\test.php
directory of the file: C:\xampp\htdocs\answersmind.com
directory of the file: C:\xampp\htdocs\answersmind.com
current function name :
class name:
trait name includes the namespace it was declared:
class method name:
current namespace name: 
   
*/

 



answered Oct 9, 2017 by avibootz

Related questions

1 answer 162 views
162 views asked Oct 16, 2017 by avibootz
1 answer 220 views
220 views asked Jun 5, 2016 by avibootz
1 answer 178 views
178 views asked Dec 16, 2016 by avibootz
1 answer 190 views
2 answers 208 views
...