3v4l.org

run code in 300+ PHP versions simultaneously
<?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], "\t\n\r"), 0, count($line)-1); $lastItem = rtrim($line[count($line)-1], "\t\n\r"); echo $lastItem.PHP_EOL; echo strlen($lastItem).PHP_EOL; echo substr($lastItem, 0, strlen($lastItem)-1).PHP_EOL; $lastItemIndex = count($line) - 1; $lastItem = rtrim($line[$lastItemIndex], "\t\n\r"); $line[$lastItemIndex] = substr($lastItem, 0, strlen($lastItem)-1); print_r($line);
Output for git.master, git.master_jit, rfc.property-hooks
3232" 5 3232 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] => 3232 )

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:
62.01 ms | 402 KiB | 8 Q