3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '1 1197 3 1,00KG ROLLER SMOKE SMOKED CA1,5KG 14811692 28.04.20 49 9992 ________ 2 331 3 1,00KG SALAMI POTATO CA750G 14563423 30.07.20 49 9992 ________ 3 443 5 1 ST OX SALAMI HALAL 200G 14946417 05.05.20 49 9992 ________ 4 533 2 1 PK FRANKFURTER 70G/STK 350G 15507358 05.05.20 49 9992 ________ 5 544 1 1,00KG SAUSAGE DELI CA1KG 14794445 05.05.20 49 9992 ________'; $parts = explode('________ ', $str); foreach($parts as $part) { $strings = explode(' ', $part); $id = $strings[1]; $qty = $strings[2]; echo $id . ',' .$qty."\r\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
1197,3 331,3 443,5 533,2 544,1

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:
26.81 ms | 405 KiB | 5 Q