????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 3.21.113.219
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/array/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/array/range_errors.phpt
--TEST--
Test range() function (errors)
--INI--
precision=14
--FILE--
<?php

echo "\n*** Testing error conditions ***\n";

echo "\n-- Testing ( (low < high) && (step = 0) ) --"; 
var_dump( range(1, 2, 0) );
var_dump( range("a", "b", 0) );

echo "\n\n-- Testing ( (low > high) && (step = 0) ) --";
var_dump( range(2, 1, 0) );
var_dump( range("b", "a", 0) );

echo "\n\n-- Testing ( (low < high) && (high-low < step) ) --";
var_dump( range(1.0, 7.0, 6.5) );

echo "\n\n-- Testing ( (low > high) && (low-high < step) ) --";
var_dump( range(7.0, 1.0, 6.5) );

echo "\n-- Testing Invalid number of arguments --";        
var_dump( range() );  // No.of args = 0
var_dump( range(1) );  // No.of args < expected
var_dump( range(1,2,3,4) );  // No.of args > expected
var_dump( range(-1, -2, 2) );  
var_dump( range("a", "j", "z") );

echo "\n-- Testing Invalid steps --";
$step_arr = array( "string", NULL, FALSE, "", "\0" );

foreach( $step_arr as $step ) {
  var_dump( range( 1, 5, $step ) );
}

echo "Done\n";
?>
--EXPECTF--
*** Testing error conditions ***

-- Testing ( (low < high) && (step = 0) ) --
Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)


-- Testing ( (low > high) && (step = 0) ) --
Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)


-- Testing ( (low < high) && (high-low < step) ) --
Warning: range(): step exceeds the specified range in %s on line %d
bool(false)


-- Testing ( (low > high) && (low-high < step) ) --
Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

-- Testing Invalid number of arguments --
Warning: range() expects at least 2 parameters, 0 given in %s on line %d
bool(false)

Warning: range() expects at least 2 parameters, 1 given in %s on line %d
bool(false)

Warning: range() expects at most 3 parameters, 4 given in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

-- Testing Invalid steps --
Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)

Warning: range(): step exceeds the specified range in %s on line %d
bool(false)
Done

Youez - 2016 - github.com/yon3zu
LinuXploit