3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = <<<EOD data:text/base64;MSwgMSwgMSwgMSwgJ1l1bGlhbmEgQXJyZWRvbmRvJywgJ01pIHJhesOzbiBzb2NpYWwnLCAnc250QHNudC5zbnQnLCAnYW9lYW9lYW9lMScsICdhdmF0YXJfNTY2MjdlYjdlYTE3NC5wbmcnLCAnQ1VJSDkwMDQxOVJDNCcsICcyMDE1LTEyLTA5JywgJzIwMTUtMTItMjMnLCAnMjAxNS0xMi0wMScsICdTWVNURU0tQ1NWJw0KMSwgMSwgMSwgMSwgJ0VkdWFyZG8gZGUgbGEgQ3J1eicsICdNaSByYXrDs24gc29jaWFsJywgJ3NudEBzbnQuc250JywgJ2FvZWFvZWFvZTEnLCAnYXZhdGFyXzU2NjI3ZWI3ZWExNzQucG5nJywgJ0NVSUg5MDA0MTlSQzYnLCAnMjAxNS0xMi0wOScsICcyMDE1LTEyLTIzJywgJzIwMTUtMTItMDEnLCAnU1lTVEVNLUNTVic= EOD; $b64 = $input; $pos = strpos($b64, ';'); if($pos !== false){ $b64 = preg_replace('#^data:text/\w+;base64,#i', '', $b64); var_dump($b64); $b64 = base64_decode($b64); } $array = str_getcsv($b64); var_dump($array);
based on dNpZf
Output for 5.3.20 - 7.2.0
string(505) "data:text/base64;MSwgMSwgMSwgMSwgJ1l1bGlhbmEgQXJyZWRvbmRvJywgJ01pIHJhesOzbiBzb2NpYWwnLCAnc250QHNudC5zbnQnLCAnYW9lYW9lYW9lMScsICdhdmF0YXJfNTY2MjdlYjdlYTE3NC5wbmcnLCAnQ1VJSDkwMDQxOVJDNCcsICcyMDE1LTEyLTA5JywgJzIwMTUtMTItMjMnLCAnMjAxNS0xMi0wMScsICdTWVNURU0tQ1NWJw0KMSwgMSwgMSwgMSwgJ0VkdWFyZG8gZGUgbGEgQ3J1eicsICdNaSByYXrDs24gc29jaWFsJywgJ3NudEBzbnQuc250JywgJ2FvZWFvZWFvZTEnLCAnYXZhdGFyXzU2NjI3ZWI3ZWExNzQucG5nJywgJ0NVSUg5MDA0MTlSQzYnLCAnMjAxNS0xMi0wOScsICcyMDE1LTEyLTIzJywgJzIwMTUtMTItMDEnLCAnU1lTVEVNLUNTVic=" array(1) { [0]=> string(376) "u�Z��m���{� K K K K �][X[�H\��Yۙ�� �ZH�^��ۈ���X[ � �۝۝ �۝ � �[�X[�X[�LI� �]�]\��M����X��XLM� ���� ��RRL NT�� � ̌ MKLL�LI� ̌ MKLL�L��� ̌ MKLL�L I� ��T�SKP�Չ�B�K K K K �YX\��HHܝ^�� �ZH�^��ۈ���X[ � �۝۝ �۝ � �[�X[�X[�LI� �]�]\��M����X��XLM� ���� ��RRL NT�͉� ̌ MKLL�LI� ̌ MKLL�L��� ̌ MKLL�L I� ��T�SKP�Չ" }