403Webshell
Server IP : 54.94.228.101  /  Your IP : 172.28.20.13
Web Server : Apache
System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1
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 : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/vinumday2_0/vendor/symfony/debug/Resources/ext/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/vinumday2_0/vendor/symfony/debug/Resources/ext/tests/001.phpt
--TEST--
Test symfony_zval_info API
--SKIPIF--
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
--FILE--
<?php

$int = 42;
$float = 42.42;
$str = 'foobar';
$object = new StdClass();
$array = array('foo', 'bar');
$resource = tmpfile();
$null = null;
$bool = true;

$anotherint = 42;
$refcount2 = &$anotherint;

$var = array(
    'int' => $int,
    'float' => $float,
    'str' => $str,
    'object' => $object,
    'array' => $array,
    'resource' => $resource,
    'null' => $null,
    'bool' => $bool,
    'refcount' => &$refcount2,
);

var_dump(symfony_zval_info('int', $var));
var_dump(symfony_zval_info('float', $var));
var_dump(symfony_zval_info('str', $var));
var_dump(symfony_zval_info('object', $var));
var_dump(symfony_zval_info('array', $var));
var_dump(symfony_zval_info('resource', $var));
var_dump(symfony_zval_info('null', $var));
var_dump(symfony_zval_info('bool', $var));

var_dump(symfony_zval_info('refcount', $var));
var_dump(symfony_zval_info('not-exist', $var));
?>
--EXPECTF--
array(4) {
  ["type"]=>
  string(7) "integer"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
}
array(4) {
  ["type"]=>
  string(6) "double"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
}
array(5) {
  ["type"]=>
  string(6) "string"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
  ["strlen"]=>
  int(6)
}
array(8) {
  ["type"]=>
  string(6) "object"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
  ["object_class"]=>
  string(8) "stdClass"
  ["object_refcount"]=>
  int(1)
  ["object_hash"]=>
  string(32) "%s"
  ["object_handle"]=>
  int(%d)
}
array(5) {
  ["type"]=>
  string(5) "array"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
  ["array_count"]=>
  int(2)
}
array(7) {
  ["type"]=>
  string(8) "resource"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
  ["resource_handle"]=>
  int(%d)
  ["resource_type"]=>
  string(6) "stream"
  ["resource_refcount"]=>
  int(1)
}
array(4) {
  ["type"]=>
  string(4) "NULL"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
}
array(4) {
  ["type"]=>
  string(7) "boolean"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(2)
  ["zval_isref"]=>
  bool(false)
}
array(4) {
  ["type"]=>
  string(7) "integer"
  ["zval_hash"]=>
  string(16) "%s"
  ["zval_refcount"]=>
  int(3)
  ["zval_isref"]=>
  bool(true)
}
NULL

Youez - 2016 - github.com/yon3zu
LinuXploit