mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
4ad9dbbac9
update_op1_const() implements the right logic here -- these cannot be replaced by different opcodes, as the by-ref passing behavior is not the same.
20 lines
407 B
PHP
20 lines
407 B
PHP
--TEST--
|
|
Don't optimize send opcodes that differ in by-ref behavior
|
|
--FILE--
|
|
<?php
|
|
|
|
call_user_func('ref', function_exists('strlen'));
|
|
ref(function_exists('strlen'));
|
|
|
|
function ref(&$x) {
|
|
var_dump($x);
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: ref(): Argument #1 ($x) must be passed by reference, value given in %s on line %d
|
|
bool(true)
|
|
|
|
Notice: Only variables should be passed by reference in %s on line %d
|
|
bool(true)
|