3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrCSV = array(); //if (($handle = fopen("http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=7&e=7&f=2012&g=d&a=8&b=7&c=1984&ignore=.csv", "r")) !==FALSE) if (($handle = fopen("http://ichart.finance.yahoo.com/table.csv?s=AAPL", "r")) !==FALSE) { $key = 0; while (($data = fgetcsv($handle, 0, ",")) !==FALSE) { //echo '<br/>======<br/>'; //print_r($data); $c = count($data); If ($key != 0) { $arrCSV[$key-1][0] = strtotime($data[0])*1000; //Time $arrCSV[$key-1][1] = floatval($data[1]); //Open $arrCSV[$key-1][2] = floatval($data[2]); //High $arrCSV[$key-1][3] = floatval($data[3]); //Low $arrCSV[$key-1][4] = floatval($data[6]); //Adj Close $arrCSV[$key-1][5] = floatval($data[5]); //Volume } //echo '<Br/>'; //print_r($arrCSV[$key-1]); $key++; } // end while $keymax = $key; fclose($handle); } // end if echo json_encode($arrCSV); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: fopen(): php_network_getaddresses: getaddrinfo for ichart.finance.yahoo.com failed: System error in /in/DQj2W on line 5 Warning: fopen(http://ichart.finance.yahoo.com/table.csv?s=AAPL): Failed to open stream: php_network_getaddresses: getaddrinfo for ichart.finance.yahoo.com failed: System error in /in/DQj2W on line 5 []

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.67 ms | 402 KiB | 8 Q