3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = "id,first_name,last_name,email,country,ip_address 1,Daniel,Jenkins,djenkins0@storify.com,Sweden,234.45.13.29 2,Arthur,Pierce,apierce1@google.cn,Ecuador,83.163.37.204 3,Dorothy,Sanchez,dsanchez2@squarespace.com,Greece,52.251.217.127 4,Anthony,Greene,agreene3@nhs.uk,France,15.123.64.87 5,Catherine,Reyes,creyes4@pinterest.com,Russia,163.2.133.124"; $csv = array_map("str_getcsv", str_getcsv($data)); $cols = array_shift($csv); var_dump($csv); var_dump($cols);
Output for git.master, git.master_jit, rfc.property-hooks
array(30) { [0]=> array(1) { [0]=> string(10) "first_name" } [1]=> array(1) { [0]=> string(9) "last_name" } [2]=> array(1) { [0]=> string(5) "email" } [3]=> array(1) { [0]=> string(7) "country" } [4]=> array(1) { [0]=> string(12) "ip_address 1" } [5]=> array(1) { [0]=> string(6) "Daniel" } [6]=> array(1) { [0]=> string(7) "Jenkins" } [7]=> array(1) { [0]=> string(21) "djenkins0@storify.com" } [8]=> array(1) { [0]=> string(6) "Sweden" } [9]=> array(1) { [0]=> string(14) "234.45.13.29 2" } [10]=> array(1) { [0]=> string(6) "Arthur" } [11]=> array(1) { [0]=> string(6) "Pierce" } [12]=> array(1) { [0]=> string(18) "apierce1@google.cn" } [13]=> array(1) { [0]=> string(7) "Ecuador" } [14]=> array(1) { [0]=> string(15) "83.163.37.204 3" } [15]=> array(1) { [0]=> string(7) "Dorothy" } [16]=> array(1) { [0]=> string(7) "Sanchez" } [17]=> array(1) { [0]=> string(25) "dsanchez2@squarespace.com" } [18]=> array(1) { [0]=> string(6) "Greece" } [19]=> array(1) { [0]=> string(16) "52.251.217.127 4" } [20]=> array(1) { [0]=> string(7) "Anthony" } [21]=> array(1) { [0]=> string(6) "Greene" } [22]=> array(1) { [0]=> string(15) "agreene3@nhs.uk" } [23]=> array(1) { [0]=> string(6) "France" } [24]=> array(1) { [0]=> string(14) "15.123.64.87 5" } [25]=> array(1) { [0]=> string(9) "Catherine" } [26]=> array(1) { [0]=> string(5) "Reyes" } [27]=> array(1) { [0]=> string(21) "creyes4@pinterest.com" } [28]=> array(1) { [0]=> string(6) "Russia" } [29]=> array(1) { [0]=> string(13) "163.2.133.124" } } array(1) { [0]=> string(2) "id" }

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:
54.81 ms | 405 KiB | 8 Q