1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00

Add new test

This commit is contained in:
Marcus Boerger
2004-01-05 22:17:14 +00:00
parent de6184edee
commit 780b420797
2 changed files with 45 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #26801 (switch ($a{0}) crash)
--FILE--
<?php
$a = '11';
$b = $a{0};
switch ($b) {
case '-':
break;
}
$a = '22';
switch ($a{0}) {
case '-':
break;
}
?>
===DONE===
--EXPECT--
===DONE===
+23
View File
@@ -0,0 +1,23 @@
--TEST--
#26802 (Can't call static method using a variable)
--FILE--
<?php
class foo
{
static public function bar() {
print "baz\n";
}
}
foo::bar();
$static_method = "foo::bar";
$static_method();
?>
===DONE===
--EXPECT--
baz
===DONE===