Skip to content

Instantly share code, notes, and snippets.

@Crash--
Created June 26, 2014 15:45
Show Gist options
  • Save Crash--/767e0558118b047e9334 to your computer and use it in GitHub Desktop.
Save Crash--/767e0558118b047e9334 to your computer and use it in GitHub Desktop.
<?php
public function streamAction(){
$toto = $this->xml_stream_reader('./data/hg3.xml');
var_dump($toto);
return false;
}
public function xml_stream_reader($url)
{
echo 'ok';
die();
yield $this->displayXML($reader->readOuterXml());
}
$this->streamAction();;
/*
Expected Result : 'ok'
Actual Result : object(Generator)#259 (0) { }
If I comment the yeld line, I got the expected result... WTF
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment