WarpConduit Computing

  • Quick Tips
  • Web Design & Development
  • Graphic Design
  • Home
  • WordPress Plugins
  • Password Generator
  • About

Listing available variables, constants, functions, classes in PHP

January 25, 2011 by Josh Hartman

A short post today to help you in debugging your applications. You may find yourself someday wondering what variables are currently set and their contents, or what constants have been set by an application or framework you are coding. Well the answer is rather simple using var_dump function. Here is the breakdown:

List all defined variables with their respective values:

var_dump(get_defined_vars());

var_dump(get_defined_vars());

List all defined constants with their respective values:

var_dump(get_defined_constants());

var_dump(get_defined_constants());

List all defined internal and user functions:

var_dump(get_defined_functions());

var_dump(get_defined_functions());

List all declared classes:

var_dump(get_declared_classes());

var_dump(get_declared_classes());

That’s it, I hope you get some use out of these functions like i did!

Filed Under: Web Design & Development Tagged With: classes, constants, dump, functions, list, php, variables

Connect

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • YouTube

Recent Posts

  • Installing BookStack Wiki on cPanel Shared Hosting
  • Media (MIME) Type Reference List
  • Extremely Useful Applications for Web Development and IT Tasks

Tags

automatic base64 benchmark cache counter css deflate email font gzip htaccess html image inarray increment inline images in_array javascript jquery link list magento mailto menu metadot mysql number obfuscation opencart operating system order php random redirect rewriterule slashes software timestamp ubuntu unix upgrade url windows windows 7 wordpress

Blogroll

  • CodeIgniter
  • Fusion Forward
  • jQuery
  • Nettuts+
  • Smashing Magazine

© 2019 WarpConduit Computing. All Rights Reserved.