3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TAG DESCRIPTION QUANTITY UNIT PRICE TAX RCV DEPREC. ACV 1. Remove 3 tab - 25 yr. - composition shingle roofing - 21.25 SQ 52.83 0.00 1,122.64 (0.00) 1,122.64 incl. felt 2. 3 tab - 25 yr. - composition shingle roofing - incl. felt 24.67 SQ 186.84 199.43 4,808.77 (0.00) 4,808.77 3. R&R Drip edge 196.95 LF 2.33 16.27 475.16 (0.00) 475.16 4. Asphalt starter - universal starter course 100.58 LF 1.31 3.67 135.43 (0.00) 135.43 5. Ice & water barrier 118.94 SF 1.15 4.34 141.12 (0.00) 141.12 6. R&R Roof vent - turtle type - Metal 5.00 EA 51.09 6.55 262.00 (0.00) 262.00 7. R&R Flashing - pipe jack 3.00 EA 38.63 2.95 118.84 (0.00) 118.84 8. R&R Rain cap - 6" 2.00 EA 36.80 3.40 77.00 (0.00) 77.00 9. R&R Ridge cap - composition shingles 77.58 LF 4.67 7.04 369.33 (0.00) 369.33 10. Digital satellite system - Detach & reset 1.00 EA 31.40 0.00 31.40 (0.00) 31.40 11. Digital satellite system - alignment and calibration 1.00 EA 94.19 0.00 94.19 (0.00) 94.19 only 12. R&R Flashing - pipe jack - split boot 1.00 EA 76.00 3.76 79.76 (0.00) 79.76 13. R&R Gutter / downspout - aluminum - up to 5" 152.58 LF 7.13 49.56 1,137.45 (0.00) 1,137.45 TAG; var_dump(explode(PHP_EOL, preg_replace('/\s+(\d+\.)\s+/', PHP_EOL . '$1 ', $text)));
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.4, 8.3.6 - 8.3.27, 8.4.1 - 8.4.14
array(14) { [0]=> string(51) "DESCRIPTION QUANTITY UNIT PRICE TAX RCV DEPREC. ACV" [1]=> string(112) "1. Remove 3 tab - 25 yr. - composition shingle roofing - 21.25 SQ 52.83 0.00 1,122.64 (0.00) 1,122.64 incl. felt" [2]=> string(108) "2. 3 tab - 25 yr. - composition shingle roofing - incl. felt 24.67 SQ 186.84 199.43 4,808.77 (0.00) 4,808.77" [3]=> string(58) "3. R&R Drip edge 196.95 LF 2.33 16.27 475.16 (0.00) 475.16" [4]=> string(86) "4. Asphalt starter - universal starter course 100.58 LF 1.31 3.67 135.43 (0.00) 135.43" [5]=> string(63) "5. Ice & water barrier 118.94 SF 1.15 4.34 141.12 (0.00) 141.12" [6]=> string(78) "6. R&R Roof vent - turtle type - Metal 5.00 EA 51.09 6.55 262.00 (0.00) 262.00" [7]=> string(67) "7. R&R Flashing - pipe jack 3.00 EA 38.63 2.95 118.84 (0.00) 118.84" [8]=> string(58) "8. R&R Rain cap - 6" 2.00 EA 36.80 3.40 77.00 (0.00) 77.00" [9]=> string(79) "9. R&R Ridge cap - composition shingles 77.58 LF 4.67 7.04 369.33 (0.00) 369.33" [10]=> string(83) "10. Digital satellite system - Detach & reset 1.00 EA 31.40 0.00 31.40 (0.00) 31.40" [11]=> string(99) "11. Digital satellite system - alignment and calibration 1.00 EA 94.19 0.00 94.19 (0.00) 94.19 only" [12]=> string(79) "12. R&R Flashing - pipe jack - split boot 1.00 EA 76.00 3.76 79.76 (0.00) 79.76" [13]=> string(94) "13. R&R Gutter / downspout - aluminum - up to 5" 152.58 LF 7.13 49.56 1,137.45 (0.00) 1,137.45" }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 array(14) { [0]=> string(51) "DESCRIPTION QUANTITY UNIT PRICE TAX RCV DEPREC. ACV" [1]=> string(112) "1. Remove 3 tab - 25 yr. - composition shingle roofing - 21.25 SQ 52.83 0.00 1,122.64 (0.00) 1,122.64 incl. felt" [2]=> string(108) "2. 3 tab - 25 yr. - composition shingle roofing - incl. felt 24.67 SQ 186.84 199.43 4,808.77 (0.00) 4,808.77" [3]=> string(58) "3. R&R Drip edge 196.95 LF 2.33 16.27 475.16 (0.00) 475.16" [4]=> string(86) "4. Asphalt starter - universal starter course 100.58 LF 1.31 3.67 135.43 (0.00) 135.43" [5]=> string(63) "5. Ice & water barrier 118.94 SF 1.15 4.34 141.12 (0.00) 141.12" [6]=> string(78) "6. R&R Roof vent - turtle type - Metal 5.00 EA 51.09 6.55 262.00 (0.00) 262.00" [7]=> string(67) "7. R&R Flashing - pipe jack 3.00 EA 38.63 2.95 118.84 (0.00) 118.84" [8]=> string(58) "8. R&R Rain cap - 6" 2.00 EA 36.80 3.40 77.00 (0.00) 77.00" [9]=> string(79) "9. R&R Ridge cap - composition shingles 77.58 LF 4.67 7.04 369.33 (0.00) 369.33" [10]=> string(83) "10. Digital satellite system - Detach & reset 1.00 EA 31.40 0.00 31.40 (0.00) 31.40" [11]=> string(99) "11. Digital satellite system - alignment and calibration 1.00 EA 94.19 0.00 94.19 (0.00) 94.19 only" [12]=> string(79) "12. R&R Flashing - pipe jack - split boot 1.00 EA 76.00 3.76 79.76 (0.00) 79.76" [13]=> string(94) "13. R&R Gutter / downspout - aluminum - up to 5" 152.58 LF 7.13 49.56 1,137.45 (0.00) 1,137.45" }

preferences:
58.18 ms | 414 KiB | 5 Q