xref: /PHP-7.0/ext/dom/tests/bug28817.phpt (revision d3571ea2)
1--TEST--
2Bug #28817 (properties in extended class)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8class z extends domDocument{
9	/** variable can have name */
10	public $p_array;
11	public $p_variable;
12
13	function __construct(){
14		$this->p_array[] = 'bonus';
15		$this->p_array[] = 'vir';
16		$this->p_array[] = 'semper';
17		$this->p_array[] = 'tiro';
18
19		$this->p_variable = 'Cessante causa cessat effectus';
20	}
21}
22
23$z=new z();
24var_dump($z->p_array);
25var_dump($z->p_variable);
26?>
27--EXPECTF--
28array(4) {
29  [0]=>
30  string(5) "bonus"
31  [1]=>
32  string(3) "vir"
33  [2]=>
34  string(6) "semper"
35  [3]=>
36  string(4) "tiro"
37}
38string(30) "Cessante causa cessat effectus"
39