top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to read purticular variable without know variable name in PHP?

+3 votes
69 views
How to read purticular variable without know variable name in PHP?
posted Mar 27, 2015 by Durai

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

Why I can't read static variables of a child class, even so the variable is protected or public?

Here's what I tried:

class A {
 protected static $foo = "bar";
}

class B {
 public function readFoo() {
 return self::$foo;
 }
}

When now calling B::readFoo, I get the following error:

var_dump((new B())->readFoo());

PHP Fatal error: Access to undeclared static property: B::$foo in php shell code on line 1
PHP Stack trace:
PHP 1. {main}() php shell code:0
PHP 2. B->readFoo() php shell code:1

Fatal error: Access to undeclared static property: B::$foo in php shell
code on line 1

Call Stack:
 86.2643 231224 1. {main}() php shell code:0
 86.2666 231352 2. B->readFoo() php shell code:1
0 votes

I am using PHP-FPM with Apache 2.4. I periodically change my php-fpm.conf and reload it by sending USR2 signal to the FPM process. Is there a way to print the updated parameters in FPM using phpinfo(). At present I am not seeing any FPM specific parameters in phpinfo.

+2 votes

Is there any way so that i will get to know about my variable is a number or not without using Javascript?

+8 votes

If i want to create another MySQL database using PHP, then how can i create it with a different Name ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...