mirror of
https://github.com/php/php-src.git
synced 2026-03-27 17:52:16 +01:00
25 lines
460 B
PHP
25 lines
460 B
PHP
--TEST--
|
|
Bug #73303: Scope not inherited by eval in assert()
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
public $prop;
|
|
|
|
public function main(){
|
|
assert('self::checkCacheKey(get_object_vars($this))');
|
|
echo 'Success';
|
|
}
|
|
private static function checkCacheKey($obj_properties){
|
|
return count($obj_properties) == 1;
|
|
}
|
|
}
|
|
|
|
$obj = new Test();
|
|
$obj->main();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: assert(): Calling assert() with a string argument is deprecated in %s on line %d
|
|
Success
|