3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $line = '"1212","$ 507.74","$ 0.00","$ 2,954.16","Kč 9,647.00","","TDR 697","","Kč 23,737.00","","","","","Kč 457.00","","","","","Kč 29,959.00","","","","","$ 104.00","","3232"'; $line = explode('","', $line); $line[0] = substr(trim($line[0], "\t\n\r"), 1); $line[count($line)-1] = substr(rtrim($line[count($line)-1], 0, count($line)-1), "\t\n\r"); print_r($line);
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: rtrim() expects at most 2 parameters, 3 given in /in/V9uDn on line 6 Warning: substr() expects parameter 2 to be integer, string given in /in/V9uDn on line 6 Array ( [0] => 1212 [1] => $ 507.74 [2] => $ 0.00 [3] => $ 2,954.16 [4] => Kč 9,647.00 [5] => [6] => TDR 697 [7] => [8] => Kč 23,737.00 [9] => [10] => [11] => [12] => [13] => Kč 457.00 [14] => [15] => [16] => [17] => [18] => Kč 29,959.00 [19] => [20] => [21] => [22] => [23] => $ 104.00 [24] => [25] => )
Output for 5.3.0 - 5.6.28
Warning: rtrim() expects at most 2 parameters, 3 given in /in/V9uDn on line 6 Warning: substr() expects parameter 2 to be long, string given in /in/V9uDn on line 6 Array ( [0] => 1212 [1] => $ 507.74 [2] => $ 0.00 [3] => $ 2,954.16 [4] => Kč 9,647.00 [5] => [6] => TDR 697 [7] => [8] => Kč 23,737.00 [9] => [10] => [11] => [12] => [13] => Kč 457.00 [14] => [15] => [16] => [17] => [18] => Kč 29,959.00 [19] => [20] => [21] => [22] => [23] => $ 104.00 [24] => [25] => )
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for rtrim() in /in/V9uDn on line 6 Array ( [0] => 1212 [1] => $ 507.74 [2] => $ 0.00 [3] => $ 2,954.16 [4] => Kč 9,647.00 [5] => [6] => TDR 697 [7] => [8] => Kč 23,737.00 [9] => [10] => [11] => [12] => [13] => Kč 457.00 [14] => [15] => [16] => [17] => [18] => Kč 29,959.00 [19] => [20] => [21] => [22] => [23] => $ 104.00 [24] => [25] => )