????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.170
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/b8009/php-5.6.22/ext/standard/tests/class_object/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/b8009/php-5.6.22/ext/standard/tests/class_object/get_class_vars_variation2.phpt
--TEST--
Test get_class_vars() function : testing visibility 
--FILE--
<?php
/* Prototype  : array get_class_vars(string class_name)
 * Description: Returns an array of default properties of the class. 
 * Source code: Zend/zend_builtin_functions.c
 * Alias to functions: 
 */

class Ancestor {
  function test() {
    var_dump(get_class_vars("Tester"));
  }
  
  static function testStatic() {
    var_dump(get_class_vars("Tester"));
  }
}

class Tester extends Ancestor {
  public $pub = "public var";
  protected $prot = "protected var";
  private $priv = "private var";
  
  static public $pubs = "public static var";
  static protected $prots = "protected static var";
  static private $privs = "private static var";
  
  function test() {
    var_dump(get_class_vars("Tester"));
  }
  
  static function testStatic() {
    var_dump(get_class_vars("Tester"));
  }
}

class Child extends Tester {
  function test() {
    var_dump(get_class_vars("Tester"));
  }
  
  static function testStatic() {
    var_dump(get_class_vars("Tester"));
  }
}

echo "*** Testing get_class_vars() : testing visibility\n";

echo "\n-- From global context --\n";
var_dump(get_class_vars("Tester"));

echo "\n-- From inside an object instance --\n";
$instance = new Tester();
$instance->test();

echo "\n-- From  a static context --\n";
Tester::testStatic();


echo "\n-- From inside an  parent object instance --\n";
$parent = new Ancestor();
$parent->test();

echo "\n-- From a parents static context --\n";
Ancestor::testStatic();


echo "\n-- From inside a child object instance --\n";
$child = new Child();
$child->test();

echo "\n-- From a child's static context --\n";
Child::testStatic();
?>
===DONE===
--EXPECTF--
*** Testing get_class_vars() : testing visibility

-- From global context --
array(2) {
  ["pub"]=>
  string(10) "public var"
  ["pubs"]=>
  string(17) "public static var"
}

-- From inside an object instance --
array(6) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["priv"]=>
  string(11) "private var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
  ["privs"]=>
  string(18) "private static var"
}

-- From  a static context --
array(6) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["priv"]=>
  string(11) "private var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
  ["privs"]=>
  string(18) "private static var"
}

-- From inside an  parent object instance --
array(4) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
}

-- From a parents static context --
array(4) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
}

-- From inside a child object instance --
array(4) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
}

-- From a child's static context --
array(4) {
  ["pub"]=>
  string(10) "public var"
  ["prot"]=>
  string(13) "protected var"
  ["pubs"]=>
  string(17) "public static var"
  ["prots"]=>
  string(20) "protected static var"
}
===DONE===

Youez - 2016 - github.com/yon3zu
LinuXploit