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:
Executable
+22
@@ -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===
|
||||
Executable
+23
@@ -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===
|
||||
Reference in New Issue
Block a user