3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php file_put_contents('data.csv', '1,2,3,4,5'); $handle = fopen('data.csv', 'c+'); $data = fgetcsv($handle, 2); var_dump($data[1]) ?>
based on KpaWk
Output for 7.3.0rc1 - 7.3.0rc3
Warning: file_put_contents(): open_basedir restriction in effect. File(data.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V6eRM on line 3 Warning: file_put_contents(data.csv): failed to open stream: Operation not permitted in /in/V6eRM on line 3 Warning: fopen(): open_basedir restriction in effect. File(data.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V6eRM on line 4 Warning: fopen(data.csv): failed to open stream: Operation not permitted in /in/V6eRM on line 4 Warning: fgetcsv() expects parameter 1 to be resource, bool given in /in/V6eRM on line 5 NULL
Output for 7.3.0alpha1 - 7.3.0beta3
Warning: file_put_contents(data.csv): failed to open stream: Permission denied in /in/V6eRM on line 3 Warning: fopen(data.csv): failed to open stream: Permission denied in /in/V6eRM on line 4 Warning: fgetcsv() expects parameter 1 to be resource, bool given in /in/V6eRM on line 5 NULL
Output for 5.6.38 - 7.2.11
Warning: file_put_contents(): open_basedir restriction in effect. File(data.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V6eRM on line 3 Warning: file_put_contents(data.csv): failed to open stream: Operation not permitted in /in/V6eRM on line 3 Warning: fopen(): open_basedir restriction in effect. File(data.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/V6eRM on line 4 Warning: fopen(data.csv): failed to open stream: Operation not permitted in /in/V6eRM on line 4 Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /in/V6eRM on line 5 NULL