|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-09 20:50 UTC] albertcasademont at gmail dot com
[2016-04-09 23:01 UTC] nikic@php.net
-Status: Open
+Status: Duplicate
[2016-04-09 23:01 UTC] nikic@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 17:00:01 2025 UTC |
Description: ------------ In PHP 7.0.4 the script below worked correctly, the result was TRUE. It's not the case in PHP 7.0.5 it seems that the reference inside the switch and case statements is not working correctly. Test script: --------------- <?php function bar(&$b) { switch ($b) { case 'bar': $b = null; } } $a = ['foo' => 'bar']; bar($a['foo']); var_dump(null === $a['foo']); Expected result: ---------------- bool(true) Actual result: -------------- bool(false)