3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '&#10;&#10;Invoice&#10;&#10;DATE&#10;13/11/2012&#10;&#10;INVOICE #&#10;&#10;9314&#10;BILL TO&#10;Jh Architecture3230 Mainway, Unit 3&#10;&#10;Burlington, Ontario L7M 1A5att: James Hettinger&#10;&#10;P.O. # TERMS&#10;&#10;Net 30&#10;&#10;DUE DATE&#10;&#10;13/12/2012&#10;&#10;GST #&#10;868302522&#10;&#10;Total:&#10;Balance Due:&#10;&#10;Subtotal:&#10;Total Sales Tax:&#10;&#10;Payments:&#10;&#10;Thank you for your business.&#10;To Pay by Credit Card, simply sign-in to yourPlanmine account or call us. Otherwise,&#10;please make a wire transfer payment or sendus a check.&#10;&#10;Banking Info for Wire Transfer Payments:CAD Account #: 3400018&#10;USD Account #: 0283312Name: CIBC&#10;Address: 1 St. Clair Avenue West, Toronto, Ontario M4V 1K7Transit Number: 00112&#10;Institution Number: 0010Swift Code: CIBCCATT&#10;&#10;ITEM DESCRIPTION QTY RATE AMOUNT&#10;Retail Job #M-4876: 676 Appleby Line, Unit Daycare 6,035 0.065 392.28Retail Job #M-4876: 676 Appleby Line, Unit Daycare (Wall&#10;&#10;Outlets Add-On) 6,035 0.0325 196.14Retail Job #M-4876: 676 Appleby Line, Unit Daycare (Reflected&#10;Ceiling Plan) 6,035 0.065 392.28&#10;October 11, 2012: Retainer payment received for invoice#6204876. Paid by VISA in the amount of $459.06.&#10;(reference #gmtsvpsz9n1m)HST on Sales 13.00% 127.49&#10;&#10;$1,108.19&#10;&#10;$649.13&#10;&#10;$980.70&#10;$127.49&#10;&#10;-$459.06 '; $poot = preg_match_all('/\$(\S+)/imx', $str, $result, PREG_PATTERN_ORDER); var_dump($result);
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(2) { [0]=> array(2) { [0]=> string(23) "$459.06.&#10;(reference" [1]=> string(73) "$1,108.19&#10;&#10;$649.13&#10;&#10;$980.70&#10;$127.49&#10;&#10;-$459.06" } [1]=> array(2) { [0]=> string(22) "459.06.&#10;(reference" [1]=> string(72) "1,108.19&#10;&#10;$649.13&#10;&#10;$980.70&#10;$127.49&#10;&#10;-$459.06" } }

preferences:
224.48 ms | 406 KiB | 354 Q