mirror of
https://github.com/php/php-src.git
synced 2025-01-19 18:24:15 +08:00
revert variable class support for 5.2
This commit is contained in:
parent
c8f090c13e
commit
848b1cbb91
@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Dynamic access of static members
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public static $b = 'foo';
|
||||
}
|
||||
|
||||
$classname = 'A';
|
||||
$wrongClassname = 'B';
|
||||
|
||||
echo $classname::$b."\n";
|
||||
echo $wrongClassname::$b."\n";
|
||||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
foo
|
||||
|
||||
Fatal error: Class 'B' not found in %s041.php on line %d
|
@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Dynamic access of constants
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
const B = 'foo';
|
||||
}
|
||||
|
||||
$classname = 'A';
|
||||
$wrongClassname = 'B';
|
||||
|
||||
echo $classname::B."\n";
|
||||
echo $wrongClassname::B."\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
foo
|
||||
|
||||
Fatal error: Class 'B' not found in %s042.php on line %d
|
@ -1,19 +0,0 @@
|
||||
--TEST--
|
||||
Dynamic call for static methods
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
static function foo() { return 'foo'; }
|
||||
}
|
||||
|
||||
$classname = 'A';
|
||||
$wrongClassname = 'B';
|
||||
|
||||
echo $classname::foo()."\n";
|
||||
echo $wrongClassname::foo()."\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
foo
|
||||
|
||||
Fatal error: Class 'B' not found in %s043.php on line %d
|
@ -1,21 +0,0 @@
|
||||
--TEST--
|
||||
Dynamic call for static methods dynamically named
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
static function foo() { return 'foo'; }
|
||||
}
|
||||
$classname = 'A';
|
||||
$wrongClassname = 'B';
|
||||
|
||||
$methodname = 'foo';
|
||||
|
||||
echo $classname::$methodname()."\n";
|
||||
|
||||
echo $wrongClassname::$methodname()."\n";
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
foo
|
||||
|
||||
Fatal error: Class 'B' not found in %s044.php on line %d
|
Loading…
Reference in New Issue
Block a user