mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00

RFC: https://wiki.php.net/rfc/property-hooks Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
19 lines
243 B
PHP
19 lines
243 B
PHP
--TEST--
|
|
Explicit set property hook $value parameter
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
public $prop {
|
|
set($customName) {
|
|
var_dump($customName);
|
|
}
|
|
}
|
|
}
|
|
|
|
$test = new Test();
|
|
$test->prop = 42;
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(42)
|