mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Zend/*: fix a bunch of typos (GH-16017)
* Zend/*: fix a bunch of typos * Zend/tests/try/try_catch_finally_005.phpt: update string length
This commit is contained in:
parent
15dde9d329
commit
ea297654f4
67 changed files with 92 additions and 92 deletions
|
@ -50,7 +50,7 @@ foreach ($scalar_variables as $scalar_var) {
|
||||||
|
|
||||||
// destroy the variable using unset
|
// destroy the variable using unset
|
||||||
unset( $scalar_var );
|
unset( $scalar_var );
|
||||||
// dump and see if its destroyed, expcted: NULL
|
// dump and see if its destroyed, expected: NULL
|
||||||
var_dump( $scalar_var );
|
var_dump( $scalar_var );
|
||||||
|
|
||||||
// check using isset to see if unset, expected: bool(false)
|
// check using isset to see if unset, expected: bool(false)
|
||||||
|
@ -165,11 +165,11 @@ foreach ($resources as $resource) {
|
||||||
// unset the resource
|
// unset the resource
|
||||||
unset($resource);
|
unset($resource);
|
||||||
// check using isset() and empty()
|
// check using isset() and empty()
|
||||||
var_dump( isset($resource) ); // expected: bool(flase)
|
var_dump( isset($resource) ); // expected: bool(false)
|
||||||
var_dump( empty($resource) ); // expected: bool(true)
|
var_dump( empty($resource) ); // expected: bool(true)
|
||||||
// call isset() with two args, but one set
|
// call isset() with two args, but one set
|
||||||
var_dump( isset($resource, $temp_var) ); // expected: bool(false)
|
var_dump( isset($resource, $temp_var) ); // expected: bool(false)
|
||||||
// uset the temp_var
|
// unset the temp_var
|
||||||
unset($temp_var);
|
unset($temp_var);
|
||||||
// now the isset() with both the args as unset
|
// now the isset() with both the args as unset
|
||||||
var_dump( isset($resource, $temp_var) ); // expected: bool(false);
|
var_dump( isset($resource, $temp_var) ); // expected: bool(false);
|
||||||
|
@ -211,7 +211,7 @@ var_dump($point1); // dump the object
|
||||||
// check the object and member that is not set
|
// check the object and member that is not set
|
||||||
var_dump( isset($point1) ); // expected: bool(true)
|
var_dump( isset($point1) ); // expected: bool(true)
|
||||||
var_dump( empty($point1) ); // expected: bool(false)
|
var_dump( empty($point1) ); // expected: bool(false)
|
||||||
var_dump( isset($point1->$lable) ); //expected: bool(flase)
|
var_dump( isset($point1->$lable) ); //expected: bool(false)
|
||||||
var_dump( empty($point1->$lable) ); //expected: bool(true)
|
var_dump( empty($point1->$lable) ); //expected: bool(true)
|
||||||
|
|
||||||
//set the member variable lable and check
|
//set the member variable lable and check
|
||||||
|
@ -291,7 +291,7 @@ function test_unset1() {
|
||||||
$static_var = 20;
|
$static_var = 20;
|
||||||
echo "value of static_var after new assignment: $static_var\n";
|
echo "value of static_var after new assignment: $static_var\n";
|
||||||
}
|
}
|
||||||
// call the functiont
|
// call the function
|
||||||
test_unset1();
|
test_unset1();
|
||||||
test_unset1();
|
test_unset1();
|
||||||
test_unset1();
|
test_unset1();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #27731 (error_reporing() call inside @ block does not work correctly)
|
Bug #27731 (error_reporting() call inside @ block does not work correctly)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #30162 (Catching exception in constructor couses lose of $this)
|
Bug #30162 (Catching exception in constructor causes lose of $this)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
#[AllowDynamicProperties]
|
#[AllowDynamicProperties]
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
Bug #30922 (reflective functions crash PHP when interfaces extend themselves)
|
Bug #30922 (reflective functions crash PHP when interfaces extend themselves)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
interface RecurisiveFooFar extends RecurisiveFooFar {}
|
interface RecursiveFooFar extends RecursiveFooFar {}
|
||||||
class A implements RecurisiveFooFar {}
|
class A implements RecursiveFooFar {}
|
||||||
|
|
||||||
$a = new A();
|
$a = new A();
|
||||||
var_dump($a instanceOf A);
|
var_dump($a instanceOf A);
|
||||||
echo "ok\n";
|
echo "ok\n";
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Uncaught Error: Interface "RecurisiveFooFar" not found in %s:%d
|
Fatal error: Uncaught Error: Interface "RecursiveFooFar" not found in %s:%d
|
||||||
Stack trace:
|
Stack trace:
|
||||||
#0 {main}
|
#0 {main}
|
||||||
thrown in %s on line %d
|
thrown in %s on line %d
|
||||||
|
|
|
@ -44,7 +44,7 @@ class test
|
||||||
{
|
{
|
||||||
echo "Class " . $this -> myname . " destroyed at script end\n";
|
echo "Class " . $this -> myname . " destroyed at script end\n";
|
||||||
} else {
|
} else {
|
||||||
echo "Class " . $this -> myname . " destroyed beforce script end\n";
|
echo "Class " . $this -> myname . " destroyed before script end\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #34467 (foreach + __get + __set incosistency)
|
Bug #34467 (foreach + __get + __set inconsistency)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
class abc {
|
class abc {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #36513 (comment will be outputed in last line)
|
Bug #36513 (comment will be output in last line)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function test($s) {
|
function test($s) {
|
||||||
|
|
|
@ -4,12 +4,12 @@ Bug #37707 (clone without assigning leaks memory)
|
||||||
<?php
|
<?php
|
||||||
class testme {
|
class testme {
|
||||||
function __clone() {
|
function __clone() {
|
||||||
echo "clonned\n";
|
echo "cloned\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clone new testme();
|
clone new testme();
|
||||||
echo "NO LEAK\n";
|
echo "NO LEAK\n";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
clonned
|
cloned
|
||||||
NO LEAK
|
NO LEAK
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ClassName
|
||||||
function test (OtherClassName $object) { }
|
function test (OtherClassName $object) { }
|
||||||
|
|
||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
var_dump("__autload($class)");
|
var_dump("__autoload($class)");
|
||||||
});
|
});
|
||||||
|
|
||||||
$obj = new ClassName;
|
$obj = new ClassName;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #39297 (Memory corryption because of indirect modification of overloaded array)
|
Bug #39297 (Memory corruption because of indirect modification of overloaded array)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function compareByRef(&$first, &$second) {
|
function compareByRef(&$first, &$second) {
|
||||||
|
@ -18,15 +18,15 @@ class MyTree implements ArrayAccess {
|
||||||
|
|
||||||
public function offsetSet($offset, $value): void {
|
public function offsetSet($offset, $value): void {
|
||||||
echo "offsetSet()\n";
|
echo "offsetSet()\n";
|
||||||
$cannonicalName = strtolower($offset);
|
$canonicalName = strtolower($offset);
|
||||||
$this->children[$cannonicalName] = $value;
|
$this->children[$canonicalName] = $value;
|
||||||
$value->parent = $this;
|
$value->parent = $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function offsetGet($offset): mixed {
|
public function offsetGet($offset): mixed {
|
||||||
echo "offsetGet()\n";
|
echo "offsetGet()\n";
|
||||||
$cannonicalName = strtolower($offset);
|
$canonicalName = strtolower($offset);
|
||||||
return $this->children[$cannonicalName];
|
return $this->children[$canonicalName];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #43851 (Memory corrution on reuse of assigned value)
|
Bug #43851 (Memory corruption on reuse of assigned value)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
foo();
|
foo();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #45742 Wrong class array inpretetion using constant indexes
|
Bug #45742 Wrong class array interpretation using constant indexes
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
class Constants {
|
class Constants {
|
||||||
|
|
|
@ -31,12 +31,12 @@ $f = test_2(); $f();
|
||||||
function test_3() {
|
function test_3() {
|
||||||
static $v = "";
|
static $v = "";
|
||||||
$v .= 'b';
|
$v .= 'b';
|
||||||
echo "Outer function catenates 'b' onto \$v to give $v\n";
|
echo "Outer function concatenates 'b' onto \$v to give $v\n";
|
||||||
$f = function() use($v) {
|
$f = function() use($v) {
|
||||||
echo "Inner function reckons \$v is $v\n";
|
echo "Inner function reckons \$v is $v\n";
|
||||||
};
|
};
|
||||||
$v .= 'a';
|
$v .= 'a';
|
||||||
echo "Outer function catenates 'a' onto \$v to give $v\n";
|
echo "Outer function concatenates 'a' onto \$v to give $v\n";
|
||||||
return $f;
|
return $f;
|
||||||
}
|
}
|
||||||
$f = test_3(); $f();
|
$f = test_3(); $f();
|
||||||
|
@ -51,9 +51,9 @@ Outer function increments $v to 1
|
||||||
Inner function reckons $v is 0
|
Inner function reckons $v is 0
|
||||||
Outer function increments $v to 2
|
Outer function increments $v to 2
|
||||||
Inner function reckons $v is 1
|
Inner function reckons $v is 1
|
||||||
Outer function catenates 'b' onto $v to give b
|
Outer function concatenates 'b' onto $v to give b
|
||||||
Outer function catenates 'a' onto $v to give ba
|
Outer function concatenates 'a' onto $v to give ba
|
||||||
Inner function reckons $v is b
|
Inner function reckons $v is b
|
||||||
Outer function catenates 'b' onto $v to give bab
|
Outer function concatenates 'b' onto $v to give bab
|
||||||
Outer function catenates 'a' onto $v to give baba
|
Outer function concatenates 'a' onto $v to give baba
|
||||||
Inner function reckons $v is bab
|
Inner function reckons $v is bab
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #54043: Remove inconsitency of internal exceptions and user defined exceptions
|
Bug #54043: Remove inconsistency of internal exceptions and user defined exceptions
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Bug #54367 (Use of closure causes problem in ArrayAccess)
|
Bug #54367 (Use of closure causes problem in ArrayAccess)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
class MyObjet implements ArrayAccess
|
class MyObject implements ArrayAccess
|
||||||
{
|
{
|
||||||
public function offsetSet($offset, $value): void { }
|
public function offsetSet($offset, $value): void { }
|
||||||
public function offsetExists($offset): bool { }
|
public function offsetExists($offset): bool { }
|
||||||
|
@ -16,7 +16,7 @@ class MyObjet implements ArrayAccess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$a = new MyObjet();
|
$a = new MyObject();
|
||||||
echo $a['p']('foo');
|
echo $a['p']('foo');
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
|
|
|
@ -12,7 +12,7 @@ trait THello1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Protected and public are handle more strict with a warning then what is
|
// Protected and public are handle more strict with a warning then what is
|
||||||
// expected from normal inheritance since they can have easier coliding semantics
|
// expected from normal inheritance since they can have easier colliding semantics
|
||||||
echo "PRE-CLASS-GUARD\n";
|
echo "PRE-CLASS-GUARD\n";
|
||||||
class SameNameInSubClassProducesNotice extends Base {
|
class SameNameInSubClassProducesNotice extends Base {
|
||||||
use THello1;
|
use THello1;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion)
|
Bug #63219 (Segfault when aliasing trait method when autoloader throws exception)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
trait TFoo {
|
trait TFoo {
|
||||||
|
|
|
@ -14,7 +14,7 @@ class C {
|
||||||
public function __destruct() {
|
public function __destruct() {
|
||||||
if (isset($GLOBALS["a"])) {
|
if (isset($GLOBALS["a"])) {
|
||||||
unset($GLOBALS["array"]);
|
unset($GLOBALS["array"]);
|
||||||
unset($GLOBALS["a"]); // this will be called in gc_colloct_roots and put $a into gc roots buf
|
unset($GLOBALS["a"]); // this will be called in gc_collect_roots and put $a into gc roots buf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,11 @@ while ($i++ < 9998) {
|
||||||
}
|
}
|
||||||
$t = [new C];
|
$t = [new C];
|
||||||
$t[] = &$t;
|
$t[] = &$t;
|
||||||
unset($t); // This is used to trigger C::__destruct while doing gc_colloct_roots
|
unset($t); // This is used to trigger C::__destruct while doing gc_collect_roots
|
||||||
|
|
||||||
$e = $a;
|
$e = $a;
|
||||||
unset($a); // This one cannot be put into roots buf because it's full, thus gc_colloct_roots will be called,
|
unset($a); // This one cannot be put into roots buf because it's full, thus gc_collect_roots will be called,
|
||||||
// but C::__destructor which is called in gc_colloct_roots will put $a into buf
|
// but C::__destructor which is called in gc_collect_roots will put $a into buf
|
||||||
// which will make $a be put into gc roots buf twice
|
// which will make $a be put into gc roots buf twice
|
||||||
var_dump(gc_collect_cycles());
|
var_dump(gc_collect_cycles());
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #73987 (Method compatibility check looks to original definition and not parent - nullabilty abstract)
|
Bug #73987 (Method compatibility check looks to original definition and not parent - nullability abstract)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #80811: Function exec without $output but with $restult_code parameter crashes
|
Bug #80811: Function exec without $output but with $result_code parameter crashes
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Ownership of constant expression inhereted from interface should be transfered to class
|
Ownership of constant expression inherited from interface should be tranferred to class
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
interface I {
|
interface I {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Ownership of constant expression inhereted from immutable class should be transfered to class
|
Ownership of constant expression inherited from immutable class should be tranferred to class
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
class A {
|
class A {
|
||||||
|
|
|
@ -7,13 +7,13 @@ $c = function() { var_dump($this); };
|
||||||
$d = $c->bindTo(new stdClass);
|
$d = $c->bindTo(new stdClass);
|
||||||
$d();
|
$d();
|
||||||
$rm = new ReflectionFunction($d);
|
$rm = new ReflectionFunction($d);
|
||||||
var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
|
var_dump($rm->getClosureScopeClass()->name); //dummy scope is Closure
|
||||||
|
|
||||||
//should have the same effect
|
//should have the same effect
|
||||||
$d = $c->bindTo(new stdClass, NULL);
|
$d = $c->bindTo(new stdClass, NULL);
|
||||||
$d();
|
$d();
|
||||||
$rm = new ReflectionFunction($d);
|
$rm = new ReflectionFunction($d);
|
||||||
var_dump($rm->getClosureScopeClass()->name); //dummy sope is Closure
|
var_dump($rm->getClosureScopeClass()->name); //dummy scope is Closure
|
||||||
|
|
||||||
echo "Done.\n";
|
echo "Done.\n";
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -140,7 +140,7 @@ catch (\Throwable $t) {
|
||||||
echo "Wrong exception type thrown: ".get_class($t)." : ".$t->getMessage()."\n";
|
echo "Wrong exception type thrown: ".get_class($t)." : ".$t->getMessage()."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo 'Subclass cannot closure over parant private static method'."\n";
|
echo 'Subclass cannot closure over parent private static method'."\n";
|
||||||
try {
|
try {
|
||||||
$subFoo = new SubFoo;
|
$subFoo = new SubFoo;
|
||||||
$fn = $subFoo->closePrivateStaticInvalid();
|
$fn = $subFoo->closePrivateStaticInvalid();
|
||||||
|
@ -205,7 +205,7 @@ Non-existent method should fail
|
||||||
Non-existent class should fail
|
Non-existent class should fail
|
||||||
Non-existent function should fail
|
Non-existent function should fail
|
||||||
Subclass cannot closure over parent private instance method
|
Subclass cannot closure over parent private instance method
|
||||||
Subclass cannot closure over parant private static method
|
Subclass cannot closure over parent private static method
|
||||||
Function scope cannot closure over protected instance method
|
Function scope cannot closure over protected instance method
|
||||||
Function scope cannot closure over private instance method
|
Function scope cannot closure over private instance method
|
||||||
Access private instance method of parent object through "self::" to parent method
|
Access private instance method of parent object through "self::" to parent method
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Constructor promotiong mixed with other properties, parameters and code
|
Constructor promotion mixed with other properties, parameters and code
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Empty enum with from/tryFrom doens't segfault
|
Empty enum with from/tryFrom doesn't segfault
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Dtor may throw exception furing FE_FETCH assignment
|
Dtor may throw exception during FE_FETCH assignment
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Implicit float to int conversions should not warn for literals in combined assingment operetor if float has a fractional part equal to 0
|
Implicit float to int conversions should not warn for literals in combined assignment operator if float has a fractional part equal to 0
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Implicit float to int conversions should warn for literals in combined assingment operetor
|
Implicit float to int conversions should warn for literals in combined assignment operator
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Implicit float to int conversions should warn for literals in combined assingment operetor
|
Implicit float to int conversions should warn for literals in combined assignment operator
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
sort() functions precerve foreach by reference iterator pointer
|
sort() functions preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3,4,5,0];
|
$a = [1,2,3,4,5,0];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_walk() function precerve foreach by reference iterator pointer
|
array_walk() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3,4,5];
|
$a = [1,2,3,4,5];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_push() function precerve foreach by reference iterator pointer
|
array_push() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3];
|
$a = [1,2,3];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_pop() function precerve foreach by reference iterator pointer
|
array_pop() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3];
|
$a = [1,2,3];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_shift() function precerve foreach by reference iterator pointer
|
array_shift() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3,4];
|
$a = [1,2,3,4];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_unshift() function precerve foreach by reference iterator pointer
|
array_unshift() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$a = [1,2,3];
|
$a = [1,2,3];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
array_splice() function precerve foreach by reference iterator pointer
|
array_splice() function preserve foreach by reference iterator pointer
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
/* remove before */
|
/* remove before */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
GC 001: gc_enable()/gc_diable()/gc_enabled()
|
GC 001: gc_enable()/gc_disable()/gc_enabled()
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
gc_disable();
|
gc_disable();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
GC 002: gc_enable()/gc_diable() and ini_get()
|
GC 002: gc_enable()/gc_disable() and ini_get()
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
gc_disable();
|
gc_disable();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Testing instanceof operator with class and interface inheriteds
|
Testing instanceof operator with class and interface inheritance
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: clone is independant of the original object
|
Lazy objects: clone is independent of the original object
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: clone is independant of the original object
|
Lazy objects: clone is independent of the original object
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: clone is independant of the original object
|
Lazy objects: clone is independent of the original object
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: Convertion to array
|
Lazy objects: Conversion to array
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: destructor of initialized objets is called
|
Lazy objects: destructor of initialized objects is called
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Lazy objects: destructor of lazy objets is not called if not initialized
|
Lazy objects: destructor of lazy objects is not called if not initialized
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
ZE2 Late Static Binding stacking static calleds
|
ZE2 Late Static Binding stacking static calls
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
027: Name ambiguity (class name & part of extertnal namespace name)
|
027: Name ambiguity (class name & part of external namespace name)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
require "ns_027.inc";
|
require "ns_027.inc";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
058: Usage of 'namespace' in compound names (out of namespase)
|
058: Usage of 'namespace' in compound names (out of namespace)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
const C = "const ok\n";
|
const C = "const ok\n";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
063: Old-style constructors in namesapces (not supported!)
|
063: Old-style constructors in namespaces (not supported!)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
namespace Foo;
|
namespace Foo;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Property hooks cannot have explicity visibility
|
Property hooks cannot have explicitly visibility
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
|
Bug #60153 (Interface method prototypes not enforced when implemented via traits.)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Bug #63911 (Ignore conflicting trait methods originationg from identical sub traits)
|
Bug #63911 (Ignore conflicting trait methods originating from identical sub traits)
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
trait A
|
trait A
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Abstract Trait Methods should behave like common abstract methods and
|
Abstract Trait Methods should behave like common abstract methods and
|
||||||
implementstion may be provided by other traits. Sorting order shouldn't influence result.
|
implementation may be provided by other traits. Sorting order shouldn't influence result.
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Traits are flattened recurivly.
|
Traits are flattened recursively.
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Trait method overriddes base class method
|
Trait method overrides base class method
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
|
|
@ -32,7 +32,7 @@ for ($i = 0; $i < 3; $i ++) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
var_dump("cactched");
|
var_dump("caught");
|
||||||
} finally {
|
} finally {
|
||||||
var_dump("finally");
|
var_dump("finally");
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ string(9) "continue1"
|
||||||
string(9) "continue2"
|
string(9) "continue2"
|
||||||
string(7) "finally"
|
string(7) "finally"
|
||||||
string(9) "continue2"
|
string(9) "continue2"
|
||||||
string(8) "cactched"
|
string(6) "caught"
|
||||||
string(7) "finally"
|
string(7) "finally"
|
||||||
string(9) "continue2"
|
string(9) "continue2"
|
||||||
string(7) "finally"
|
string(7) "finally"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Valid inheritence - co-variance
|
Valid inheritance - co-variance
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
Valid inheritence - co-variance
|
Valid inheritance - co-variance
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
No coercion should be applied to type false even if it's an overide
|
No coercion should be applied to type false even if it's an override
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
--TEST--
|
--TEST--
|
||||||
No coercion should be applied to type true even if it's an overide
|
No coercion should be applied to type true even if it's an override
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ ZEND_INI_BEGIN()
|
||||||
#ifdef ZEND_CHECK_STACK_LIMIT
|
#ifdef ZEND_CHECK_STACK_LIMIT
|
||||||
/* The maximum allowed call stack size. 0: auto detect, -1: no limit. For fibers, this is fiber.stack_size. */
|
/* The maximum allowed call stack size. 0: auto detect, -1: no limit. For fibers, this is fiber.stack_size. */
|
||||||
STD_ZEND_INI_ENTRY("zend.max_allowed_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateMaxAllowedStackSize, max_allowed_stack_size, zend_executor_globals, executor_globals)
|
STD_ZEND_INI_ENTRY("zend.max_allowed_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateMaxAllowedStackSize, max_allowed_stack_size, zend_executor_globals, executor_globals)
|
||||||
/* Substracted from the max allowed stack size, as a buffer, when checking for overflow. 0: auto detect. */
|
/* Subtracted from the max allowed stack size, as a buffer, when checking for overflow. 0: auto detect. */
|
||||||
STD_ZEND_INI_ENTRY("zend.reserved_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateReservedStackSize, reserved_stack_size, zend_executor_globals, executor_globals)
|
STD_ZEND_INI_ENTRY("zend.reserved_stack_size", "0", ZEND_INI_SYSTEM, OnUpdateReservedStackSize, reserved_stack_size, zend_executor_globals, executor_globals)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -813,7 +813,7 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_
|
||||||
if (fci_cache) {
|
if (fci_cache) {
|
||||||
zend_release_fcall_info_cache(fci_cache);
|
zend_release_fcall_info_cache(fci_cache);
|
||||||
}
|
}
|
||||||
return SUCCESS; /* we would result in an instable executor otherwise */
|
return SUCCESS; /* we would result in an unstable executor otherwise */
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEND_ASSERT(fci->size == sizeof(zend_fcall_info));
|
ZEND_ASSERT(fci->size == sizeof(zend_fcall_info));
|
||||||
|
|
|
@ -43,7 +43,7 @@ END_EXTERN_C()
|
||||||
|
|
||||||
The current macros are currently only used on x86 and x86_64 architectures,
|
The current macros are currently only used on x86 and x86_64 architectures,
|
||||||
on every other architecture, these macros expand to NOPs. This assumes that
|
on every other architecture, these macros expand to NOPs. This assumes that
|
||||||
other architectures do not have an internal precision and the operhand types
|
other architectures do not have an internal precision and the operand types
|
||||||
define the computational precision of floating point operations. This
|
define the computational precision of floating point operations. This
|
||||||
assumption may be false, in that case, the author is interested in further
|
assumption may be false, in that case, the author is interested in further
|
||||||
details on the other platform.
|
details on the other platform.
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
+----------------------------------------------------------------------+
|
+----------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Lazy objects are standard zend_object whose initialization is defered until
|
/* Lazy objects are standard zend_object whose initialization is deferred until
|
||||||
* one of their properties backing store is accessed for the first time.
|
* one of their properties backing store is accessed for the first time.
|
||||||
*
|
*
|
||||||
* This is implemented by using the same fallback mechanism as __get and __set
|
* This is implemented by using the same fallback mechanism as __get and __set
|
||||||
|
@ -303,7 +303,7 @@ ZEND_API zend_object *zend_object_make_lazy(zend_object *obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Objects become non-lazy if all properties are made non-lazy before
|
/* Objects become non-lazy if all properties are made non-lazy before
|
||||||
* initialization is triggerd. If the object has no properties to begin
|
* initialization is triggered. If the object has no properties to begin
|
||||||
* with, this happens immediately. */
|
* with, this happens immediately. */
|
||||||
if (UNEXPECTED(!lazy_properties_count)) {
|
if (UNEXPECTED(!lazy_properties_count)) {
|
||||||
return obj;
|
return obj;
|
||||||
|
|
|
@ -484,10 +484,10 @@ ZEND_API int ZEND_FASTCALL zend_compare_symbol_tables(HashTable *ht1, HashTable
|
||||||
ZEND_API int ZEND_FASTCALL zend_compare_arrays(zval *a1, zval *a2);
|
ZEND_API int ZEND_FASTCALL zend_compare_arrays(zval *a1, zval *a2);
|
||||||
ZEND_API int ZEND_FASTCALL zend_compare_objects(zval *o1, zval *o2);
|
ZEND_API int ZEND_FASTCALL zend_compare_objects(zval *o1, zval *o2);
|
||||||
|
|
||||||
/** Deprecatd in favor of ZEND_STRTOL() */
|
/** Deprecated in favor of ZEND_STRTOL() */
|
||||||
ZEND_ATTRIBUTE_DEPRECATED ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len);
|
ZEND_ATTRIBUTE_DEPRECATED ZEND_API int ZEND_FASTCALL zend_atoi(const char *str, size_t str_len);
|
||||||
|
|
||||||
/** Deprecatd in favor of ZEND_STRTOL() */
|
/** Deprecated in favor of ZEND_STRTOL() */
|
||||||
ZEND_ATTRIBUTE_DEPRECATED ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len);
|
ZEND_ATTRIBUTE_DEPRECATED ZEND_API zend_long ZEND_FASTCALL zend_atol(const char *str, size_t str_len);
|
||||||
|
|
||||||
#define convert_to_null_ex(zv) convert_to_null(zv)
|
#define convert_to_null_ex(zv) convert_to_null(zv)
|
||||||
|
|
|
@ -46,7 +46,7 @@ static void zend_verify_type_inference(zval *value, uint32_t type_mask, uint8_t
|
||||||
|
|
||||||
if (Z_TYPE_P(value) == IS_INDIRECT) {
|
if (Z_TYPE_P(value) == IS_INDIRECT) {
|
||||||
if (!(type_mask & MAY_BE_INDIRECT)) {
|
if (!(type_mask & MAY_BE_INDIRECT)) {
|
||||||
ZEND_VERIFY_TYPE_INFERENCE_ERROR("mask 0x%x mising MAY_BE_INDIRECT", type_mask);
|
ZEND_VERIFY_TYPE_INFERENCE_ERROR("mask 0x%x missing MAY_BE_INDIRECT", type_mask);
|
||||||
}
|
}
|
||||||
value = Z_INDIRECT_P(value);
|
value = Z_INDIRECT_P(value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue