|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-04-12 14:04 UTC] nikic@php.net
-Status: Open
+Status: Verified
[2021-04-12 14:04 UTC] nikic@php.net
[2021-04-12 14:07 UTC] git@php.net
[2021-04-12 14:07 UTC] git@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ When opcache is enabled, unexpected results will occur when executed twice or more. Test script: --------------- <?php function foo(){ $ch=curl_init('example.com'); curl_setopt($ch,CURLOPT_RETURNTRANSFER,false); ob_start(); $data=curl_exec($ch); ob_end_clean(); var_dump('out1',$data); if(true===$data){ if(null===$data){ var_dump('in1',$data); } } var_dump('out2',$data); } foo(); Expected result: ---------------- string(4) "out1" bool(true) string(4) "out2" bool(true) Actual result: -------------- string(4) "out1" bool(true) string(3) "in1" NULL string(4) "out2" bool(true)