mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix #78880: Another bunch of spelling errors
This commit is contained in:
@@ -243,7 +243,7 @@ var_dump( empty($point1->x) ); // expected: bool(true)
|
||||
// unset all members and check
|
||||
unset($point1->y);
|
||||
unset($point1->lable);
|
||||
// dump the objec to check that all variables are unset
|
||||
// dump the object to check that all variables are unset
|
||||
var_dump($point1);
|
||||
var_dump( isset($point1) ); // expected: bool(ture)
|
||||
var_dump( empty($point1) ); // expected: bool(false)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Implementating abstracting methods and optional parameters
|
||||
Implementing abstracting methods and optional parameters
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
The same rules are applied for properties that are defined in the class hierarchy. Thus, if the properties are compatible, a notice is issued, if not a fatal error occures. (relevant with #60536)
|
||||
The same rules are applied for properties that are defined in the class hierarchy. Thus, if the properties are compatible, a notice is issued, if not a fatal error occurs. (relevant with #60536)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling. (relevant to #60536)
|
||||
Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consistent with normal inheritance handling. (relevant to #60536)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consitent with normal inheritance handling. (relevant to #60536)
|
||||
Introducing new private variables of the same name in a subclass is ok, and does not lead to any output. That is consistent with normal inheritance handling. (relevant to #60536)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class ExceptionHandler {
|
||||
// this must be a class, closure does not trigger segfault
|
||||
set_exception_handler(new ExceptionHandler());
|
||||
|
||||
// exception must be throwed from error handler.
|
||||
// exception must be thrown from error handler.
|
||||
set_error_handler(function()
|
||||
{
|
||||
$e = new Exception;
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
die("skip Require a resource which is able to hold a callbck");
|
||||
die("skip Require a resource which is able to hold a callback");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #76869 (Incorrect bypassing protected method accessibilty check)
|
||||
Bug #76869 (Incorrect bypassing protected method accessibility check)
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
|
||||
@@ -153,7 +153,7 @@ class MagicCall
|
||||
|
||||
|
||||
|
||||
class PublicInvokable
|
||||
class PublicInvocable
|
||||
{
|
||||
public function __invoke($param1)
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@ echo 'Closure is already a closure';
|
||||
$fn = Closure::fromCallable($closure);
|
||||
echo $fn(" OK".PHP_EOL);
|
||||
|
||||
echo 'Class with public invokable';
|
||||
$fn = Closure::fromCallable(new PublicInvokable);
|
||||
echo 'Class with public invocable';
|
||||
$fn = Closure::fromCallable(new PublicInvocable);
|
||||
echo $fn(" OK".PHP_EOL);
|
||||
|
||||
echo "Instance return private method as callable";
|
||||
@@ -105,7 +105,7 @@ Access public instance method of parent object through parent:: OK
|
||||
Function that exists OK
|
||||
Function that exists with different spelling OK
|
||||
Closure is already a closure OK
|
||||
Class with public invokable OK
|
||||
Class with public invocable OK
|
||||
Instance return private method as callable OK
|
||||
Instance return private static method as callable OK
|
||||
Instance return protected static method as callable OK
|
||||
|
||||
@@ -12,7 +12,7 @@ try {
|
||||
// Instantiating a closure is an error, not an exception, so we shouldn't see this
|
||||
echo 'EXCEPTION: ', $e->getMessage();
|
||||
} catch (Throwable $e) {
|
||||
// This is the mesage that we should see for a caught error
|
||||
// This is the message that we should see for a caught error
|
||||
echo 'ERROR: ', $e->getMessage();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ $classlist = [
|
||||
'A'=> 'class A { const HW = "this is A"; }',
|
||||
'B'=> 'class B extends A { const HW = parent::HW." extended by B"; }',
|
||||
'space1\C' => 'namespace space1; class C { const HW = "this is space1\C"; }',
|
||||
'D' => 'class D { const HW = \space1\C::HW." extented by D"; }',
|
||||
'D' => 'class D { const HW = \space1\C::HW." extended by D"; }',
|
||||
'trE' => 'trait trE { public static function getHW() { return parent::HW; } }',
|
||||
'E' => 'class E extends B { use trE; }',
|
||||
'F' => 'class F { const XX = "this is F"; }',
|
||||
@@ -36,6 +36,6 @@ printf("G::get_me() = %s\n", G::get_me());
|
||||
?>
|
||||
--EXPECT--
|
||||
B::HW = this is A extended by B
|
||||
D::HW = this is space1\C extented by D
|
||||
D::HW = this is space1\C extended by D
|
||||
E::getHW() = this is A extended by B
|
||||
G::get_me() = got this is F extended by G
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Type group use declarations should not allow override on inner itens
|
||||
Type group use declarations should not allow override on inner items
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--TEST--
|
||||
Semantic of alias operation is to provide an additional identifier for the
|
||||
method body of the original method.
|
||||
It should also work incase the method is fully qualified.
|
||||
It should also work in case the method is fully qualified.
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Overwridden methods do not cause a conflict.
|
||||
Overwritten methods do not cause a conflict.
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Trait method overwridden by a method defined in the class.
|
||||
Trait method overwritten by a method defined in the class.
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Handling of public fields with traits needs to have same semantics as with normal inheritance, however, we do add strict warnings since it is easier to run into something unexpeted with changing traits.
|
||||
Handling of public fields with traits needs to have same semantics as with normal inheritance, however, we do add strict warnings since it is easier to run into something unexpected with changing traits.
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ declare(strict_types=1);
|
||||
// file that's explicitly weak
|
||||
require 'strict_include_explicit_weak_2.inc';
|
||||
|
||||
// calls within that file should stay weak, despite being included by strict fille
|
||||
// calls within that file should stay weak, despite being included by strict file
|
||||
?>
|
||||
--EXPECT--
|
||||
Success!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Test typed properties type must preceed first declaration in group
|
||||
Test typed properties type must precede first declaration in group
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Test unitialized typed properties normal foreach must not be yielded
|
||||
Test uninitialized typed properties normal foreach must not be yielded
|
||||
--FILE--
|
||||
<?php
|
||||
$foo = new class {
|
||||
|
||||
@@ -658,7 +658,7 @@ static zend_always_inline uint32_t zval_gc_info(uint32_t gc_type_info) {
|
||||
/* zval_gc_flags(zval.value->gc.u.type_info) (common flags) */
|
||||
#define GC_COLLECTABLE (1<<4)
|
||||
#define GC_PROTECTED (1<<5) /* used for recursion detection */
|
||||
#define GC_IMMUTABLE (1<<6) /* can't be canged in place */
|
||||
#define GC_IMMUTABLE (1<<6) /* can't be changed in place */
|
||||
#define GC_PERSISTENT (1<<7) /* allocated using malloc */
|
||||
#define GC_PERSISTENT_LOCAL (1<<8) /* persistent, but thread-local */
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ PHP_METHOD(domdocument, getElementById);
|
||||
PHP_METHOD(domdocument, adoptNode);
|
||||
PHP_METHOD(domdocument, normalizeDocument);
|
||||
PHP_METHOD(domdocument, __construct);
|
||||
/* convienience methods */
|
||||
/* convenience methods */
|
||||
PHP_METHOD(domdocument, load);
|
||||
PHP_METHOD(domdocument, save);
|
||||
PHP_METHOD(domdocument, loadXML);
|
||||
|
||||
@@ -8,7 +8,7 @@ include('skipif.inc');
|
||||
<?php
|
||||
|
||||
/* Create an XML document
|
||||
* with strcuture
|
||||
* with structure
|
||||
* <book>
|
||||
* <title>This is the title</title>
|
||||
* </book>
|
||||
|
||||
@@ -7,7 +7,7 @@ filter_var() and FILTER_SANITIZE_EMAIL
|
||||
|
||||
var_dump(filter_var("a@b.c", FILTER_SANITIZE_EMAIL));
|
||||
var_dump(filter_var("a[!@#$%^&*()@a@#$%^&*(.com@#$%^&*(", FILTER_SANITIZE_EMAIL));
|
||||
var_dump(filter_var("white space here \ \ \" som more", FILTER_SANITIZE_EMAIL));
|
||||
var_dump(filter_var("white space here \ \ \" some more", FILTER_SANITIZE_EMAIL));
|
||||
var_dump(filter_var("", FILTER_SANITIZE_EMAIL));
|
||||
var_dump(filter_var("123456789000000", FILTER_SANITIZE_EMAIL));
|
||||
|
||||
@@ -16,7 +16,7 @@ echo "Done\n";
|
||||
--EXPECT--
|
||||
string(5) "a@b.c"
|
||||
string(30) "a[!@#$%^&*@a@#$%^&*.com@#$%^&*"
|
||||
string(21) "whitespaceheresommore"
|
||||
string(22) "whitespaceheresomemore"
|
||||
string(0) ""
|
||||
string(15) "123456789000000"
|
||||
Done
|
||||
|
||||
@@ -20,7 +20,7 @@ Check for number base recognition
|
||||
$test[] = gmp_init("1234");
|
||||
$test[] = gmp_init("1234", 10);
|
||||
|
||||
/* Hexidecimal */
|
||||
/* Hexadecimal */
|
||||
$test[] = gmp_init("0x4d2");
|
||||
$test[] = gmp_init("0x4d2", 16);
|
||||
$test[] = gmp_init("4d2");
|
||||
|
||||
@@ -50,7 +50,7 @@ function imap_fetchmime($stream_id, int $msg_no, string $section, int $options =
|
||||
|
||||
/**
|
||||
* @param resource $stream_id
|
||||
* @todo: should $file be `resouce|string`? it looks like it tries to accept anything?
|
||||
* @todo: should $file be `resource|string`? it looks like it tries to accept anything?
|
||||
*/
|
||||
function imap_savebody($stream_id, $file, int $msg_no, string $section = '', int $options = 0): bool {}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ mysqli.max_persistent=1
|
||||
mysqlnd makes a connection created through mysql_init()/mysqli_real_connect() always a 'persistent' one.
|
||||
At this point 'persistent' is not to be confused with what a user calls a 'persistent' - in this case
|
||||
'persistent' means that mysqlnd uses malloc() instead of emalloc(). nothing else. ext/mysqli will
|
||||
not consider it as a 'persistent' connection in a user sense, ext/mysqli will not appy max_persistent etc.
|
||||
not consider it as a 'persistent' connection in a user sense, ext/mysqli will not apply max_persistent etc.
|
||||
Its only about malloc() vs. emalloc().
|
||||
|
||||
However, the bug is about malloc() and efree(). You can make make mysqlnd use malloc() by either using
|
||||
|
||||
@@ -65,7 +65,7 @@ $link->close();
|
||||
if (!$row = $res->fetch_assoc())
|
||||
printf("[006] [%d] %s\n", $link->errno, $link->error);
|
||||
if (!strlen($row["Value"]))
|
||||
printf("[007] Empty cipher. No encrytion!");
|
||||
printf("[007] Empty cipher. No encryption!");
|
||||
var_dump($row);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ $link->close();
|
||||
if (!$row = $res->fetch_assoc())
|
||||
printf("[012] [%d] %s\n", $link->errno, $link->error);
|
||||
if (!strlen($row["Value"]))
|
||||
printf("[013] Empty cipher. No encrytion!");
|
||||
printf("[013] Empty cipher. No encryption!");
|
||||
var_dump($row);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ die("skip Check again when the Klingons visit earth - http://bugs.mysql.com/bug.
|
||||
mysqli_free_result($res);
|
||||
|
||||
if ($meta != $expected_lib) {
|
||||
printf("[%04d - %s] Metadata differes from expected values\n",
|
||||
printf("[%04d - %s] Metadata differs from expected values\n",
|
||||
$offset + 5, $sql);
|
||||
var_dump($meta);
|
||||
var_dump($expected_lib);
|
||||
|
||||
@@ -1090,7 +1090,7 @@ int php_oci_bind_post_exec(zval *data)
|
||||
break;
|
||||
}
|
||||
} else if ((Z_TYPE_P(zv) == IS_TRUE) || (Z_TYPE_P(zv) == IS_FALSE)) {
|
||||
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temorary value) */
|
||||
/* This convetrsion is done on purpose (ext/oci8 uses LVAL as a temporary value) */
|
||||
if (Z_LVAL_P(zv) == 0)
|
||||
ZVAL_BOOL(zv, FALSE);
|
||||
else if (Z_LVAL_P(zv) == 1)
|
||||
@@ -1409,12 +1409,12 @@ sb4 php_oci_bind_in_callback(
|
||||
} else if (phpbind->statement != 0) {
|
||||
/* RSET */
|
||||
*bufpp = phpbind->statement;
|
||||
*alenp = -1; /* seems to be allright */
|
||||
*alenp = -1; /* seems to be alright */
|
||||
*indpp = (dvoid *)&phpbind->indicator;
|
||||
} else {
|
||||
/* descriptor bind */
|
||||
*bufpp = phpbind->descriptor;
|
||||
*alenp = -1; /* seems to be allright */
|
||||
*alenp = -1; /* seems to be alright */
|
||||
*indpp = (dvoid *)&phpbind->indicator;
|
||||
}
|
||||
|
||||
|
||||
@@ -713,7 +713,7 @@ to conform with the license.
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
Bump PHP OCI8 2.0 mininum requirements to PHP 5.2 and Oracle client
|
||||
Bump PHP OCI8 2.0 minimum requirements to PHP 5.2 and Oracle client
|
||||
library 10.2. (Use OCI8 1.4 for older PHP version support or if only
|
||||
Oracle 9.2 client libraries are available.)
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ oci8_test_sql_execute($c, $stmtarray);
|
||||
|
||||
// Run Test
|
||||
// The test can take some time to complete and can exceed PHP's test
|
||||
// timout limit on slow networks.
|
||||
// timeout limit on slow networks.
|
||||
|
||||
for ($x = 0; $x < 70000; $x++) {
|
||||
if (!($var = oci_new_collection($c, 'BUG44113_LIST_T'))) {
|
||||
|
||||
@@ -13,7 +13,7 @@ require __DIR__."/details.inc";
|
||||
// Test will open a connection
|
||||
// Close the connection
|
||||
// Open another connection
|
||||
// With oci_close() being a no-op, the same conneciton will be returned
|
||||
// With oci_close() being a no-op, the same connection will be returned
|
||||
|
||||
|
||||
echo "This is with a OCI_CONNECT\n";
|
||||
|
||||
@@ -14,7 +14,7 @@ require __DIR__."/details.inc";
|
||||
// Close the connection
|
||||
// Open another connection
|
||||
// With oci_close() the connection is released to the pool and hence the
|
||||
// the second conneciton will be different
|
||||
// the second connection will be different
|
||||
|
||||
|
||||
// OCI_CONNECT
|
||||
|
||||
@@ -13,7 +13,7 @@ require __DIR__."/details.inc";
|
||||
// Test will open a persistent connection
|
||||
// Close the connection
|
||||
// Open another connection
|
||||
// With oci_close() being a no-op, the same conneciton will be returned
|
||||
// With oci_close() being a no-op, the same connection will be returned
|
||||
|
||||
echo "This is with a OCI_PCONNECT\n";
|
||||
var_dump($conn1 = oci_pconnect($user,$password,$dbase));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
oci_password_change()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
|
||||
require(__DIR__.'/skipif.inc');
|
||||
require(__DIR__.'/connect.inc');
|
||||
if (empty($dbase)) die ("skip requires database connection string be set");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
ocipasswordchange()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
|
||||
require(__DIR__.'/skipif.inc');
|
||||
require(__DIR__.'/connect.inc');
|
||||
if (empty($dbase)) die ("skip requires database connection string be set");
|
||||
|
||||
@@ -102,7 +102,7 @@ void zend_optimize_temporary_variables(zend_op_array *op_array, zend_optimizer_c
|
||||
if (!zend_bitset_in(valid_T, currT)) {
|
||||
int use_new_var = 0;
|
||||
|
||||
/* Code in "finally" blocks may modify temorary variables.
|
||||
/* Code in "finally" blocks may modify temporary variables.
|
||||
* We allocate new temporaries for values that need to
|
||||
* relive FAST_CALLs.
|
||||
*/
|
||||
|
||||
@@ -93,7 +93,7 @@ static void zend_mark_reachable(zend_op *opcodes, zend_cfg *cfg, zend_basic_bloc
|
||||
b = succ;
|
||||
break;
|
||||
} else {
|
||||
/* Recusively check reachability */
|
||||
/* Recursively check reachability */
|
||||
if (!(succ->flags & ZEND_BB_REACHABLE)) {
|
||||
zend_mark_reachable(opcodes, cfg, succ);
|
||||
}
|
||||
|
||||
@@ -854,7 +854,7 @@ int zend_build_ssa(zend_arena **arena, const zend_script *script, const zend_op_
|
||||
ALLOCA_FLAG(var_use_heap)
|
||||
|
||||
if ((blocks_count * (op_array->last_var + op_array->T)) > 4 * 1024 * 1024) {
|
||||
/* Don't buld SSA for very big functions */
|
||||
/* Don't build SSA for very big functions */
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ static zend_always_inline zend_bool zend_ssa_is_no_val_use(const zend_op *opline
|
||||
if (opline->opcode == ZEND_ASSIGN || opline->opcode == ZEND_UNSET_CV) {
|
||||
return ssa_op->op1_use == var && ssa_op->op2_use != var;
|
||||
}
|
||||
// TODO: Reenable this after changing the SSA structure.
|
||||
// TODO: Re-enable this after changing the SSA structure.
|
||||
/*if (opline->opcode == ZEND_FE_FETCH_R) {
|
||||
return ssa_op->op2_use == var && ssa_op->op1_use != var;
|
||||
}*/
|
||||
|
||||
@@ -3133,7 +3133,7 @@ void accel_shutdown(void)
|
||||
#endif
|
||||
|
||||
if (!_file_cache_only) {
|
||||
/* Delay SHM dettach */
|
||||
/* Delay SHM detach */
|
||||
orig_post_shutdown_cb = zend_post_shutdown_cb;
|
||||
zend_post_shutdown_cb = accel_post_shutdown;
|
||||
}
|
||||
|
||||
@@ -6870,7 +6870,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
|
||||
/* Reuse reserved arguments stack */
|
||||
res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R4, 0x20);
|
||||
#else
|
||||
/* CPU stack alocated temorary zval */
|
||||
/* CPU stack alocated temporary zval */
|
||||
res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R4, 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SCCP 017: Array assignemnt
|
||||
SCCP 017: Array assignment
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SCCP 018: Object assignemnt
|
||||
SCCP 018: Object assignment
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SCCP 019: Array assignemnt
|
||||
SCCP 019: Array assignment
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SCCP 020: Object assignemnt
|
||||
SCCP 020: Object assignment
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "Zend/zend.h"
|
||||
#include "Zend/zend_signal.h"
|
||||
|
||||
/* php_signal using sigaction is derived from Advanced Programing
|
||||
/* php_signal using sigaction is derived from Advanced Programming
|
||||
* in the Unix Environment by W. Richard Stevens p 298. */
|
||||
Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ function test_stop_signal(){
|
||||
if ( pcntl_wifstopped($status) ) {
|
||||
$signal_print=pcntl_wstopsig($status);
|
||||
if ($signal_print==SIGSTOP) $signal_print="SIGSTOP";
|
||||
print "\nProcess was stoped by signal : ". $signal_print;
|
||||
print "\nProcess was stopped by signal : ". $signal_print;
|
||||
}
|
||||
posix_kill($pid, SIGCONT);
|
||||
}
|
||||
@@ -82,4 +82,4 @@ Testing pcntl_wifsignaled....
|
||||
Process was terminated by signal : SIGTERM
|
||||
|
||||
Testing pcntl_wifstopped and pcntl_wstopsig....
|
||||
Process was stoped by signal : SIGSTOP
|
||||
Process was stopped by signal : SIGSTOP
|
||||
|
||||
@@ -114,7 +114,7 @@ static SLJIT_INLINE int get_map_jit_flag()
|
||||
|
||||
/* The following code is thread safe because multiple initialization
|
||||
sets map_jit_flag to the same value and the code has no side-effects.
|
||||
Changing the kernel version witout system restart is (very) unlikely. */
|
||||
Changing the kernel version without system restart is (very) unlikely. */
|
||||
if (map_jit_flag == -1) {
|
||||
struct utsname name;
|
||||
|
||||
@@ -358,7 +358,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void)
|
||||
free_block = free_blocks;
|
||||
while (free_block) {
|
||||
next_free_block = free_block->next;
|
||||
if (!free_block->header.prev_size &&
|
||||
if (!free_block->header.prev_size &&
|
||||
AS_BLOCK_HEADER(free_block, free_block->size)->size == 1) {
|
||||
total_size -= free_block->size;
|
||||
sljit_remove_free_block(free_block);
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
|
||||
#elif (defined SLJIT_DEBUG && SLJIT_DEBUG)
|
||||
|
||||
/* Assertion failure occures if an invalid argument is passed. */
|
||||
/* Assertion failure occurs if an invalid argument is passed. */
|
||||
#undef SLJIT_ARGUMENT_CHECKS
|
||||
#define SLJIT_ARGUMENT_CHECKS 1
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
|
||||
#define TMP_REG3_mapped 6
|
||||
#define ADDR_TMP_mapped 7
|
||||
|
||||
/* Flags are keept in volatile registers. */
|
||||
/* Flags are kept in volatile registers. */
|
||||
#define EQUAL_FLAG 8
|
||||
/* And carry flag as well. */
|
||||
#define ULESS_FLAG 9
|
||||
@@ -115,7 +115,7 @@ SLJIT_API_FUNC_ATTRIBUTE const char *sljit_get_platform_name(void)
|
||||
typedef sljit_uw sljit_ins;
|
||||
|
||||
struct jit_instr {
|
||||
const struct tilegx_opcode* opcode;
|
||||
const struct tilegx_opcode* opcode;
|
||||
tilegx_pipeline pipe;
|
||||
unsigned long input_registers;
|
||||
unsigned long output_registers;
|
||||
@@ -896,7 +896,7 @@ static sljit_s32 push_jr_buffer(struct sljit_compiler *compiler, tilegx_mnemonic
|
||||
inst_buf[inst_buf_index].output_registers = 0;
|
||||
inst_buf[inst_buf_index].line = line;
|
||||
inst_buf_index++;
|
||||
|
||||
|
||||
return flush_buffer(compiler);
|
||||
}
|
||||
|
||||
@@ -1178,7 +1178,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi
|
||||
{
|
||||
sljit_ins base;
|
||||
sljit_s32 i, tmp;
|
||||
|
||||
|
||||
CHECK_ERROR();
|
||||
CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
|
||||
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
|
||||
|
||||
@@ -70,7 +70,7 @@ static HANDLE allocator_mutex = 0;
|
||||
|
||||
static SLJIT_INLINE void allocator_grab_lock(void)
|
||||
{
|
||||
/* No idea what to do if an error occures. Static mutexes should never fail... */
|
||||
/* No idea what to do if an error occurs. Static mutexes should never fail... */
|
||||
if (!allocator_mutex)
|
||||
allocator_mutex = CreateMutex(NULL, TRUE, NULL);
|
||||
else
|
||||
@@ -90,7 +90,7 @@ static HANDLE global_mutex = 0;
|
||||
|
||||
SLJIT_API_FUNC_ATTRIBUTE void SLJIT_FUNC sljit_grab_lock(void)
|
||||
{
|
||||
/* No idea what to do if an error occures. Static mutexes should never fail... */
|
||||
/* No idea what to do if an error occurs. Static mutexes should never fail... */
|
||||
if (!global_mutex)
|
||||
global_mutex = CreateMutex(NULL, TRUE, NULL);
|
||||
else
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #41638 (pcre 7.0 regression)
|
||||
--FILE--
|
||||
<?php
|
||||
$str = "repeater id='loopt' dataSrc=subject colums=2";
|
||||
$str = "repeater id='loopt' dataSrc=subject columns=2";
|
||||
|
||||
preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead);
|
||||
print_r($str_instead);
|
||||
|
||||
@@ -32,7 +32,7 @@ $db = MySQLPDOTest::factory();
|
||||
}
|
||||
|
||||
if (!is_null($expect) && ($expect != $both)) {
|
||||
printf("[%03d] Expected differes from returned data, dumping\n", $offset);
|
||||
printf("[%03d] Expected differs from returned data, dumping\n", $offset);
|
||||
var_dump($expect);
|
||||
var_dump($both);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ $db = MySQLPDOTest::factory();
|
||||
$stmt->closeCursor();
|
||||
|
||||
if ($label != $value) {
|
||||
printf("[%03d/%s + 6] Got %s expecting %s - plase check manually\n",
|
||||
printf("[%03d/%s + 6] Got %s expecting %s - please check manually\n",
|
||||
$offset, ($native) ? 'native' : 'emulated',
|
||||
var_export($label, true), var_export($value, true));
|
||||
// fall through
|
||||
@@ -74,14 +74,14 @@ $db = MySQLPDOTest::factory();
|
||||
}
|
||||
|
||||
if ($row['label'] != $value) {
|
||||
printf("[%03d/%s + 8] Got %s expecting %s - plase check manually\n",
|
||||
printf("[%03d/%s + 8] Got %s expecting %s - please check manually\n",
|
||||
$offset, ($native) ? 'native' : 'emulated',
|
||||
var_export($row['label'], true), var_export($value, true));
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($row['label'] != $label) {
|
||||
printf("[%03d/%s + 9] Got %s from FETCH_ASSOC and %s from FETCH_BOUND- plase check manually\n",
|
||||
printf("[%03d/%s + 9] Got %s from FETCH_ASSOC and %s from FETCH_BOUND- please check manually\n",
|
||||
$offset, ($native) ? 'native' : 'emulated',
|
||||
var_export($row['label'], true), var_export($value, true));
|
||||
return false;
|
||||
|
||||
@@ -236,7 +236,7 @@ SQL
|
||||
$db->exec('INSERT INTO test(id, label) VALUES (1, 1)');
|
||||
$stmt = $db->query('SELECT id, label FROM test');
|
||||
$meta = $stmt->getColumnMeta(0);
|
||||
// verify the flags array countains a not_null flag and not nullable flags
|
||||
// verify the flags array contains a not_null flag and not nullable flags
|
||||
if (!isset($meta['flags'])) {
|
||||
printf("[1001] No flags contained in metadata %s\n", var_export($meta, true));
|
||||
} else {
|
||||
@@ -252,7 +252,7 @@ SQL
|
||||
printf("[1002] Flags seem wrong %s\n", var_export($meta, true));
|
||||
}
|
||||
$meta = $stmt->getColumnMeta(1);
|
||||
// verify the flags array countains a nullable flag and not not_null flags
|
||||
// verify the flags array contains a nullable flag and not not_null flags
|
||||
if (!isset($meta['flags'])) {
|
||||
printf("[1003] No flags contained in metadata %s\n", var_export($meta, true));
|
||||
} else {
|
||||
|
||||
@@ -1030,7 +1030,7 @@ static PHP_METHOD(PDO, pgsqlLOBUnlink)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto mixed PDO::pgsqlGetNotify([ int $result_type = PDO::FETCH_USE_DEFAULT] [, int $ms_timeout = 0 ]])
|
||||
Get asyncronous notification */
|
||||
Get asynchronous notification */
|
||||
static PHP_METHOD(PDO, pgsqlGetNotify)
|
||||
{
|
||||
pdo_dbh_t *dbh;
|
||||
|
||||
@@ -12,7 +12,7 @@ $file = "<?php
|
||||
Phar::mapPhar('hio');
|
||||
__HALT_COMPILER(); ?>";
|
||||
|
||||
// compressed file length does not match incompressed lentgh for an uncompressed file
|
||||
// compressed file length does not match incompressed length for an uncompressed file
|
||||
|
||||
$files = array();
|
||||
$files['a'] = array('cont'=>'a','ulen'=>1,'clen'=>2);
|
||||
|
||||
@@ -13,7 +13,7 @@ $file = "<?php
|
||||
Phar::mapPhar('hio');
|
||||
__HALT_COMPILER(); ?>";
|
||||
|
||||
// compressed file length does not match incompressed lentgh for an uncompressed file
|
||||
// compressed file length does not match incompressed length for an uncompressed file
|
||||
|
||||
$files = array();
|
||||
$files['a/subdir/here'] = array('cont'=>'a','ulen'=>1,'clen'=>1);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Reflection on invokable objects
|
||||
Reflection on invocable objects
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ static inline void spl_filesystem_object_get_file_name(spl_filesystem_object *in
|
||||
if (intern->file_name) {
|
||||
efree(intern->file_name);
|
||||
}
|
||||
/* if there is parent path, ammend it, otherwise just use the given path as is */
|
||||
/* if there is parent path, ammnd it, otherwise just use the given path as is */
|
||||
if (path_len == 0) {
|
||||
intern->file_name_len = spprintf(
|
||||
&intern->file_name, 0, "%s", intern->u.dir.entry.d_name);
|
||||
|
||||
@@ -539,7 +539,7 @@ SPL_METHOD(SplObjectStorage, removeAllExcept)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool SplObjectStorage::contains(object obj)
|
||||
Determine whethe an object is contained in the storage */
|
||||
Determine whether an object is contained in the storage */
|
||||
SPL_METHOD(SplObjectStorage, contains)
|
||||
{
|
||||
zval *obj;
|
||||
|
||||
@@ -20,7 +20,7 @@ class barUser { use bar; }
|
||||
class foobarUser { use foo, bar; }
|
||||
|
||||
/** There is no semantics for traits in the inheritance chain.
|
||||
Traits are flattend into a class, and that semantics is nothing
|
||||
Traits are flattened into a class, and that semantics is nothing
|
||||
like a type, or interface, and thus, not propergated. */
|
||||
class fooViaBarUser extends barUser { use foo; }
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SPL: FixedArray: Trying to instantiate passing string to construtor parameter
|
||||
SPL: FixedArray: Trying to instantiate passing string to constructor parameter
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SPL: spl_autoload_functions() with closures and invokables
|
||||
SPL: spl_autoload_functions() with closures and invocables
|
||||
--FILE--
|
||||
<?php
|
||||
$closure = function($class) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
SPL: spl_autoload_unregister() with closures and invokables
|
||||
SPL: spl_autoload_unregister() with closures and invocables
|
||||
--FILE--
|
||||
<?php
|
||||
$closure = function($class) {
|
||||
|
||||
@@ -9,7 +9,7 @@ Chris Scott chris.scott@nstein.com
|
||||
$ai = new ArrayIterator(array(new stdClass(), new stdClass()));
|
||||
$ci = new CachingIterator($ai);
|
||||
var_dump(
|
||||
$ci->__toString() // if conversion to string is done by echo, for example, an exeption is thrown. Invoking __toString explicitly covers different code.
|
||||
$ci->__toString() // if conversion to string is done by echo, for example, an exception is thrown. Invoking __toString explicitly covers different code.
|
||||
);
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -24,7 +24,7 @@ $input_arrays = array (
|
||||
// associative arrays - key as numeric
|
||||
array(1 => 'one', 2 => "two", 3 => "three"),
|
||||
|
||||
// array containing elements with/witout keys
|
||||
// array containing elements with/without keys
|
||||
array(1 => 'one','two', 3 => 'three', 4, "five" => 5)
|
||||
|
||||
);
|
||||
|
||||
@@ -8,7 +8,7 @@ Test array_map() function : usage variations - anonymous callback function
|
||||
*/
|
||||
|
||||
/*
|
||||
* Test array_map() by passing anoymous callback function with following variations
|
||||
* Test array_map() by passing anonymous callback function with following variations
|
||||
*/
|
||||
|
||||
echo "*** Testing array_map() : anonymous callback function ***\n";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Test array_multisort() function : usage variation - testing with anonymous arrary arguments
|
||||
Test array_multisort() function : usage variation - testing with anonymous array arguments
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]], ...])
|
||||
|
||||
@@ -19,7 +19,7 @@ $dir_handle = opendir( __DIR__ );
|
||||
//store resources in array for comparison.
|
||||
$resources = array($file_handle, $dir_handle);
|
||||
|
||||
// search for resouce type in the resource array
|
||||
// search for resource type in the resource array
|
||||
var_dump( array_search($file_handle, $resources, true) );
|
||||
//checking for (int) type resource
|
||||
var_dump( array_search((int)$dir_handle, $resources, true) );
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,7 @@ Test count() function
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype: int count ( mixed $var [, int $mode] );
|
||||
Discription: Count elements in an array, or properties in an object
|
||||
Description: Count elements in an array, or properties in an object
|
||||
*/
|
||||
|
||||
echo "*** Testing basic functionality of count() function ***\n";
|
||||
|
||||
@@ -9,7 +9,7 @@ Test in_array() function : usage variations - haystack as resource/multi dimensi
|
||||
* Source Code: ext/standard/array.c
|
||||
*/
|
||||
|
||||
/* Test in_array() with haystack as resouce and multidimensional arrays */
|
||||
/* Test in_array() with haystack as resource and multidimensional arrays */
|
||||
|
||||
/* checking for Resources */
|
||||
echo "*** Testing resource type with in_array() ***\n";
|
||||
@@ -22,7 +22,7 @@ $dir_handle = opendir( __DIR__ );
|
||||
//store resources in array for comparison.
|
||||
$resources = array($file_handle, $dir_handle);
|
||||
|
||||
// search for resouce type in the resource array
|
||||
// search for resource type in the resource array
|
||||
var_dump( in_array($file_handle, $resources, true) );
|
||||
//checking for (int) type resource
|
||||
var_dump( in_array((int)$dir_handle, $resources, true) );
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,7 +8,7 @@ Test natcasesort() function : usage variations - referenced variables
|
||||
*/
|
||||
|
||||
/*
|
||||
* Pass an array of referenced varaibles to test how natcasesort() re-orders it
|
||||
* Pass an array of referenced variables to test how natcasesort() re-orders it
|
||||
*/
|
||||
|
||||
echo "*** Testing natcasesort() : usage variation ***\n";
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -42,14 +42,14 @@ chmod($sub_dir_path, 0777);
|
||||
$child_dir_path = $sub_dir_path."/child_dir";
|
||||
@mkdir($child_dir_path);
|
||||
|
||||
// remove the write and execute permisson from sub parent
|
||||
// remove the write and execute permission from sub parent
|
||||
chmod($sub_dir_path, 0444);
|
||||
echo "-- After restricting 1st level parent directory --\n";
|
||||
$d = dir($child_dir_path); // try to open, expected failure
|
||||
var_dump( $d ); // dump it
|
||||
|
||||
// remove the execute permisson from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permisson to sub dir
|
||||
// remove the execute permission from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permission to sub dir
|
||||
chmod($parent_dir_path, 0666); // restricting parent directory
|
||||
echo "-- After restricting parent directory --\n";
|
||||
$d = dir($child_dir_path); // try to open, expected failure
|
||||
|
||||
@@ -41,15 +41,15 @@ chmod($sub_dir_path, 0777);
|
||||
$child_dir_path = $sub_dir_path."/child_dir";
|
||||
mkdir($child_dir_path);
|
||||
|
||||
// remove the write and execute permisson from sub parent
|
||||
// remove the write and execute permission from sub parent
|
||||
chmod($sub_dir_path, 0444);
|
||||
|
||||
echo "\n-- After restricting 1st level parent directory --\n";
|
||||
$dir_handle1 = opendir($child_dir_path);
|
||||
var_dump( $dir_handle1 );
|
||||
|
||||
// remove the execute permisson from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permisson to sub dir
|
||||
// remove the execute permission from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permission to sub dir
|
||||
chmod($parent_dir_path, 0666); // restricting parent directory
|
||||
|
||||
echo "\n-- After restricting parent directory --\n";
|
||||
|
||||
@@ -42,14 +42,14 @@ chmod($sub_dir_path, 0777);
|
||||
$child_dir_path = $sub_dir_path."/child_dir";
|
||||
mkdir($child_dir_path);
|
||||
|
||||
// remove the write and execute permisson from sub parent
|
||||
// remove the write and execute permission from sub parent
|
||||
chmod($sub_dir_path, 0444);
|
||||
|
||||
echo "\n-- After restricting 1st level parent directory --\n";
|
||||
var_dump(scandir($child_dir_path));
|
||||
|
||||
// remove the execute permisson from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permisson to sub dir
|
||||
// remove the execute permission from parent dir, allowing all permission for sub dir
|
||||
chmod($sub_dir_path, 0777); // all permission to sub dir
|
||||
chmod($parent_dir_path, 0666); // restricting parent directory
|
||||
|
||||
echo "\n-- After restricting parent directory --\n";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #77552 Unintialized php_stream_statbuf in stat functions
|
||||
Bug #77552 Uninitialized php_stream_statbuf in stat functions
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
@@ -15,7 +15,7 @@ $target = $tmpDir.'/folder/target';
|
||||
mkdir($target, 0777, true);
|
||||
|
||||
$junction = $tmpDir.'/junction';
|
||||
$cmd = sprintf('mklink /J "%s" "%s"', $junction, $target);
|
||||
$cmd = sprintf('mklink /J "%s" "%s"', $junction, $target);
|
||||
exec($cmd);
|
||||
|
||||
$stat = lstat($junction);
|
||||
|
||||
@@ -8,7 +8,7 @@ Test copy() function: usage variations - non existing src/dest
|
||||
*/
|
||||
|
||||
/* Test copy(): Trying to create a copy of non-existing source in an existing destination
|
||||
and an existing source in non-existing destiantion */
|
||||
and an existing source in non-existing destination */
|
||||
|
||||
$file_path = __DIR__;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Test fgetc() function : basic functionality
|
||||
include ("file.inc");
|
||||
|
||||
echo "*** Testing fgetc() : basic operations ***\n";
|
||||
/* read charecter from different files which are opened in different modes */
|
||||
/* read character from different files which are opened in different modes */
|
||||
$file_modes = array( "r", "rb", "rt", "r+", "r+b", "r+t");
|
||||
|
||||
/* create file with following type of contents */
|
||||
@@ -46,7 +46,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou
|
||||
var_dump( fgetc($file_handle) ); // read a char
|
||||
var_dump( ftell($file_handle) ); // file pointer position
|
||||
var_dump( feof($file_handle) ); // is it eof()
|
||||
var_dump($file_handle); // dump the $file_handle to see if any thing got modifed
|
||||
var_dump($file_handle); // dump the $file_handle to see if any thing got modified
|
||||
} // end of for
|
||||
|
||||
// close the file
|
||||
|
||||
@@ -35,7 +35,7 @@ foreach($file_modes as $file_mode) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/* read with length beyong file size */
|
||||
/* read with length beyond file size */
|
||||
echo "-- fgets() with length > filesize --\n";
|
||||
rewind($file_handle);
|
||||
|
||||
|
||||
@@ -202,7 +202,7 @@ function change_file_perms($file_path,
|
||||
permissions. File is filled with content of size specified.
|
||||
$file_path = dir where files will be created
|
||||
$name_prefix = prefix to be used for names, name is suffix with a
|
||||
unqiue numeric value to make the file name unique, default = file
|
||||
unique numeric value to make the file name unique, default = file
|
||||
$name_suffix = suffix to be used for the name, default = 1
|
||||
$count = total no. of files to be created, default = 1
|
||||
$mode = file open mode as specified in fopen() call. Do not use
|
||||
@@ -215,7 +215,7 @@ function change_file_perms($file_path,
|
||||
"empty" = empty file
|
||||
"text_with_new_line" = similar to text fill type, but writes with new line char
|
||||
"alphanumeric" = fill file with alpha numeric text
|
||||
If imporper $content type is specified, file is created as empty
|
||||
If improper $content type is specified, file is created as empty
|
||||
$size = size of the fill in terms of kilobyte, i.e size of the file.
|
||||
if $flag is specified as "byte", then then given size is taken in bytes
|
||||
$flag = specify if size has to be treated as no of total bytes or
|
||||
|
||||
@@ -34,7 +34,7 @@ rmdir($thisTestDir);
|
||||
|
||||
function runtest() {
|
||||
global $filename;
|
||||
//correct php53 behaviour is to ingnore the FILE_USE_INCLUDE_PATH unless the file alread exists
|
||||
//correct php53 behaviour is to ignore the FILE_USE_INCLUDE_PATH unless the file already exists
|
||||
// in the include path. In this case it doesn't so the file should be written in the current dir.
|
||||
file_put_contents($filename, "File in include path", FILE_USE_INCLUDE_PATH);
|
||||
$line = file_get_contents($filename);
|
||||
|
||||
@@ -60,7 +60,7 @@ clearstatcache();
|
||||
|
||||
echo "-- writing data after hole and checking the size --\n";
|
||||
$file_handle = fopen($filename, "a");
|
||||
fwrite($file_handle, "Hello\0"); //wrting 6 bytes of data
|
||||
fwrite($file_handle, "Hello\0"); //writing 6 bytes of data
|
||||
fclose($file_handle);
|
||||
var_dump( filesize($filename) ); //226 bytes
|
||||
clearstatcache();
|
||||
|
||||
@@ -62,7 +62,7 @@ clearstatcache();
|
||||
|
||||
echo "-- writing data after hole and checking the size --\n";
|
||||
$file_handle = fopen($filename, "a");
|
||||
fwrite($file_handle, "Hello\0"); //wrting 6 bytes of data
|
||||
fwrite($file_handle, "Hello\0"); //writing 6 bytes of data
|
||||
fclose($file_handle);
|
||||
var_dump( filesize($filename) ); //226 bytes
|
||||
clearstatcache();
|
||||
|
||||
@@ -15,7 +15,7 @@ echo "*** Testing error conditions ***\n";
|
||||
$file = preg_replace("~\.phpt?$~", '.tmp', __FILE__);
|
||||
$fp = fopen($file, "w");
|
||||
|
||||
/* array of operatons */
|
||||
/* array of operations */
|
||||
$operations = array(
|
||||
0,
|
||||
LOCK_NB,
|
||||
|
||||
@@ -8,13 +8,13 @@ Description: PHP supports a portable way of locking complete files
|
||||
in an advisory way
|
||||
*/
|
||||
|
||||
echo "*** Testing flock() fun with the various operation and
|
||||
echo "*** Testing flock() fun with the various operation and
|
||||
wouldblock values ***\n";
|
||||
|
||||
$file = preg_replace("~\.phpt?$~", null, __FILE__);
|
||||
$fp = fopen($file, "w");
|
||||
|
||||
/* array of operatons */
|
||||
/* array of operations */
|
||||
$operations = array(
|
||||
LOCK_SH,
|
||||
LOCK_EX,
|
||||
@@ -66,7 +66,7 @@ fclose($fp);
|
||||
echo "\n*** Done ***\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
*** Testing flock() fun with the various operation and
|
||||
*** Testing flock() fun with the various operation and
|
||||
wouldblock values ***
|
||||
--- Outer iteration 0 ---
|
||||
bool(true)
|
||||
|
||||
@@ -54,7 +54,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric"
|
||||
exit();
|
||||
}
|
||||
|
||||
/* read file by giving the acutal length, check the length and content by calculating the
|
||||
/* read file by giving the actual length, check the length and content by calculating the
|
||||
hash using md5() function
|
||||
*/
|
||||
/* Reading 1024 bytes from file, expecting 1024 bytes */ ;
|
||||
|
||||
@@ -8,7 +8,7 @@ Test fscanf() function: usage variations - integer formats with integer values
|
||||
Description: Parses input from a file according to a format
|
||||
*/
|
||||
|
||||
/* Test fscanf() to scan different integer values using different interger format types */
|
||||
/* Test fscanf() to scan different integer values using different integer format types */
|
||||
|
||||
$file_path = __DIR__;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ chmod("$file_path/is_executable_variation2", 0444);
|
||||
var_dump( is_executable("$file_path/is_executable_variation2") ); // exp: bool(false)
|
||||
chmod("$file_path/is_executable_variation2", 0777); // chmod to enable deletion of directory
|
||||
|
||||
echo "\n*** Testing miscelleneous input for is_executable() function ***\n";
|
||||
echo "\n*** Testing miscellaneous input for is_executable() function ***\n";
|
||||
$name_prefix = "is_executable_variation2";
|
||||
create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1);
|
||||
create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2);
|
||||
@@ -77,7 +77,7 @@ rmdir(__DIR__."/is_executable_variation2/");
|
||||
*** Testing is_executable() on directory without execute permission ***
|
||||
bool(false)
|
||||
|
||||
*** Testing miscelleneous input for is_executable() function ***
|
||||
*** Testing miscellaneous input for is_executable() function ***
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
-- Iteration 2 --
|
||||
|
||||
@@ -15,7 +15,7 @@ $file_path = __DIR__;
|
||||
echo "-- Testing is_file() with file containing data --\n";
|
||||
$filename = $file_path."/is_file_variation1.tmp";
|
||||
$file_handle = fopen($filename, "w" );
|
||||
fwrite( $file_handle, "Hello, world....." ); // exptected true
|
||||
fwrite( $file_handle, "Hello, world....." ); // expected true
|
||||
fclose($file_handle);
|
||||
var_dump( is_file($filename) );
|
||||
clearstatcache();
|
||||
|
||||
@@ -26,7 +26,7 @@ chmod("$file_path/is_readable_variation2", 0001);
|
||||
var_dump( is_readable("$file_path/is_readable_variation2") ); // exp: bool(false)
|
||||
chmod("$file_path/is_readable_variation2", 0777); // chmod to enable deletion of directory
|
||||
|
||||
echo "\n*** Testing miscelleneous input for is_readable() function ***\n";
|
||||
echo "\n*** Testing miscellaneous input for is_readable() function ***\n";
|
||||
$name_prefix = "is_readable_variation2";
|
||||
create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1);
|
||||
create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2);
|
||||
@@ -77,7 +77,7 @@ rmdir(__DIR__."/is_readable_variation2/");
|
||||
*** Testing is_readable() on directory without read permission ***
|
||||
bool(false)
|
||||
|
||||
*** Testing miscelleneous input for is_readable() function ***
|
||||
*** Testing miscellaneous input for is_readable() function ***
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
-- Iteration 2 --
|
||||
|
||||
@@ -17,7 +17,7 @@ echo "*** Testing is_readable(): usage variations ***\n";
|
||||
$file_handle = fopen(__FILE__, "r");
|
||||
unset($file_handle);
|
||||
|
||||
echo "\n*** Testing is_readable() on miscelleneous filenames ***\n";
|
||||
echo "\n*** Testing is_readable() on miscellaneous filenames ***\n";
|
||||
$misc_files = array(
|
||||
0,
|
||||
1234,
|
||||
@@ -40,7 +40,7 @@ echo "Done\n";
|
||||
--EXPECTF--
|
||||
*** Testing is_readable(): usage variations ***
|
||||
|
||||
*** Testing is_readable() on miscelleneous filenames ***
|
||||
*** Testing is_readable() on miscellaneous filenames ***
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -29,7 +29,7 @@ var_dump( is_writable("$file_path/is_writable_variation2") ); // exp: bool(fals
|
||||
var_dump( is_writeable("$file_path/is_writable_variation2") ); // exp: bool(false)
|
||||
chmod("$file_path/is_writable_variation2", 0777); // chmod to enable deletion of directory
|
||||
|
||||
echo "\n*** Testing miscelleneous input for is_writable() function ***\n";
|
||||
echo "\n*** Testing miscellaneous input for is_writable() function ***\n";
|
||||
$name_prefix = "is_writable_variation2";
|
||||
create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1);
|
||||
create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2);
|
||||
@@ -83,7 +83,7 @@ rmdir(__DIR__."/is_writable_variation2/");
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
*** Testing miscelleneous input for is_writable() function ***
|
||||
*** Testing miscellaneous input for is_writable() function ***
|
||||
-- Iteration 1 --
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user