+++ /dev/null
---TEST--
-Bug #27641 (zend.ze1_compatibility_mode = On causes object properties to be misreported)
---SKIPIF--
-<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?>
---INI--
-error_reporting=4095
---FILE--
-<?php
- class A {
- public $a = "Default for A";
- public $b = "Default for B";
-
- function __construct($a, $b) {
- $this->a = $a;
- $this->b = $b;
- }
- function A() {
- $args = func_get_args();
- call_user_func_array(Array(&$this, '__construct'), $args);
- }
- }
-
- $t = new A("New A", "New B");
- print_r($t);
- print_r(get_class_vars(get_class($t)));
- print_r(get_object_vars($t));
-?>
---EXPECTF--
-Strict Standards: Redefining already defined constructor for class A in %sbug27641.php on line %d
-A Object
-(
- [a] => New A
- [b] => New B
-)
-Array
-(
- [a] => Default for A
- [b] => Default for B
-)
-Array
-(
- [a] => New A
- [b] => New B
-)
+++ /dev/null
---TEST--
-Bug #30332 (zend.ze1_compatibility_mode isnt fully compatable with array_push())
---INI--
-zend.ze1_compatibility_mode=on
-error_reporting=4095
---FILE--
-<?php
-class x { };
-
-$first = new x;
-$second = $first;
-$container = array();
-array_push($container, $first);
-
-$first->first = " im in the first";
-
-print_r($first);
-print_r($second);
-print_r($container);
-?>
---EXPECTF--
-Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 4
-
-Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 5
-
-Strict Standards: Implicit cloning object of class 'x' because of 'zend.ze1_compatibility_mode' in %sbug30332.php on line 7
-x Object
-(
- [first] => im in the first
-)
-x Object
-(
-)
-Array
-(
- [0] => x Object
- (
- )
-
-)
+++ /dev/null
---TEST--
-Bug #31828 (Crash with zend.ze1_compatibility_mode=On)
---INI--
-zend.ze1_compatibility_mode=on
-error_reporting=4095
---FILE--
-<?php
-$o = new stdClass();
-$o->id = 77;
-$o->name = "Aerospace";
-$a[] = $o;
-$a = $a[0];
-print_r($a);
-?>
---EXPECTF--
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 2
-
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 5
-
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug31828.php on line 6
-stdClass Object
-(
- [id] => 77
- [name] => Aerospace
-)
+++ /dev/null
---TEST--
-Bug #32080 (segfault when assigning object to itself with zend.ze1_compatibility_mode=On)
---INI--
-zend.ze1_compatibility_mode=on
-error_reporting=4095
---FILE--
-<?php
-class test { }
-$t = new test;
-$t = $t; // gives segfault
-var_dump($t);
-?>
---EXPECTF--
-Strict Standards: Implicit cloning object of class 'test' because of 'zend.ze1_compatibility_mode' in %sbug32080.php on line 3
-
-Strict Standards: Implicit cloning object of class 'test' because of 'zend.ze1_compatibility_mode' in %sbug32080.php on line 5
-object(test)#%d (0) {
-}
+++ /dev/null
---TEST--
-Bug #32852 (Crash with singleton and __destruct when zend.ze1_compatibility_mode = On)
---INI--
-zend.ze1_compatibility_mode=on
-error_reporting=4095
---FILE--
-<?php
-class crashme {
- private static $instance = null;
-
- public function __construct() {
- self::$instance = $this;
- }
-
- public function __destruct() {
- echo "i'm called\n";
- }
-
- public static function singleton() {
- if (!isset(self::$instance)) {
- self::$instance = new crashme();
- }
- return self::$instance;
- }
-}
-
-crashme::singleton();
-?>
---EXPECTF--
-Strict Standards: Implicit cloning object of class 'crashme' because of 'zend.ze1_compatibility_mode' in %sbug32852.php on line 6
-i'm called
-
-Strict Standards: Implicit cloning object of class 'crashme' because of 'zend.ze1_compatibility_mode' in %sbug32852.php on line 15
-i'm called
-
-Strict Standards: Implicit cloning object of class 'crashme' because of 'zend.ze1_compatibility_mode' in %sbug32852.php on line 17
-i'm called
-i'm called
+++ /dev/null
---TEST--
-Bug #33243 (ze1_compatibility_mode does not work as expected)
---INI--
-zend.ze1_compatibility_mode=1
-error_reporting=4095
---FILE--
-<?php
-$a->y->z = 0;
-$b = $a; // should perform deep copy of $a
-$b->y->z = 1; // hence this should have no effect on $a
-var_dump($a);
-?>
---EXPECTF--
-Strict Standards: Creating default object from empty value in %sbug33243.php on line 2
-
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug33243.php on line 3
-
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug33243.php on line 5
-object(stdClass)#%d (1) {
- ["y"]=>
- object(stdClass)#%d (1) {
- ["z"]=>
- int(0)
- }
-}
+++ /dev/null
---TEST--
-Bug #34712 zend.ze1_compatibility_mode = on segfault
---INI--
-zend.ze1_compatibility_mode=1
-error_reporting=4095
---FILE--
-<?php
-class foo {
- function foo(&$obj_ref) {
- $this->bar = &$obj_ref;
- }
-}
-
-
-class bar {
- function bar() {
- $this->foo = new foo($this);
- }
-}
-
-$test = new bar;
-echo "ok\n";
-?>
---EXPECTF--
-Strict Standards: Implicit cloning object of class 'foo' because of 'zend.ze1_compatibility_mode' in %sbug34712.php on line 11
-
-Strict Standards: Implicit cloning object of class 'bar' because of 'zend.ze1_compatibility_mode' in %sbug34712.php on line 15
-ok
+++ /dev/null
---TEST--
-Bug #34767 (Zend Engine 1 Compatibility not copying objects correctly)
---INI--
-zend.ze1_compatibility_mode=1
-error_reporting=4095
---FILE--
-<?php
-$a->y = &new stdClass();
-print_r($a);
-$b = $a;
-$a->y->z = 1;
-print_r($b);
-?>
---EXPECTF--
-
-Strict Standards: Assigning the return value of new by reference is deprecated in %sbug34767.php on line 2
-stdClass Object
-(
- [y] => stdClass Object
- (
- )
-
-)
-
-Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug34767.php on line 4
-stdClass Object
-(
- [y] => stdClass Object
- (
- [z] => 1
- )
-
-)