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/tests/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/tests/classes/constants_basic_001.phpt
--TEST--
Class constant declarations
--FILE--
<?php
  define('DEFINED', 1234);
  $def = 456;
  define('DEFINED_TO_VAR', $def);
  define('DEFINED_TO_UNDEF_VAR', $undef);

  class C
  {
      const c0 = UNDEFINED;

      const c1 = 1, c2 = 1.5;
      const c3 =  + 1, c4 =  + 1.5;
      const c5 = -1, c6 = -1.5;

      const c7 = __LINE__;
      const c8 = __FILE__;
      const c9 = __CLASS__;
      const c10 = __METHOD__;
      const c11 = __FUNCTION__;

      const c12 = DEFINED;
      const c13 = DEFINED_TO_VAR;
      const c14 = DEFINED_TO_UNDEF_VAR;

      const c15 = "hello1";
      const c16 = 'hello2';
      const c17 = C::c16;
      const c18 = self::c17;
  }

  echo "\nAttempt to access various kinds of class constants:\n";
  var_dump(C::c0);
  var_dump(C::c1);
  var_dump(C::c2);
  var_dump(C::c3);
  var_dump(C::c4);
  var_dump(C::c5);
  var_dump(C::c6);
  var_dump(C::c7);
  var_dump(C::c8);
  var_dump(C::c9);
  var_dump(C::c10);
  var_dump(C::c11);
  var_dump(C::c12);
  var_dump(C::c13);
  var_dump(C::c14);
  var_dump(C::c15);
  var_dump(C::c16);
  var_dump(C::c17);
  var_dump(C::c18);

  echo "\nExpecting fatal error:\n";
  var_dump(C::c19);

  echo "\nYou should not see this.";
?>
--EXPECTF--
Notice: Undefined variable: undef in %s on line 5

Attempt to access various kinds of class constants:

Warning: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' (this will throw an Error in a future version of PHP) in %s on line %d
string(9) "UNDEFINED"
int(1)
float(1.5)
int(1)
float(1.5)
int(-1)
float(-1.5)
int(15)
string(%d) "%s"
string(1) "C"
string(1) "C"
string(0) ""
int(1234)
int(456)
NULL
string(6) "hello1"
string(6) "hello2"
string(6) "hello2"
string(6) "hello2"

Expecting fatal error:

Fatal error: Uncaught Error: Undefined class constant 'c19' in %s:53
Stack trace:
#0 {main}
  thrown in %s on line 53

Youez - 2016 - github.com/yon3zu
LinuXploit