3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "id=1&action=save&title=Corporate+Identity&short=identity&colour=%23ff751a&categoryID=1&bookURL=%2Ffiles%2Fbooks%2Fart_of_corporate_identity.pdf&bookImage=%2Ffiles%2Fimages%2Farticle-thumbs%2Fidentity.png&intro=%3Cp%3E%3Cbr+data-mce-bogus%3D%221%22%3E%3C%2Fp%3E&section%5B%5D%5Btitle%5D=Your+current+identity&section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D=5&section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D=What's+going+on+here%3F&section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D=This+is+option+1&section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D=Option+2!&section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D=And+number+3!&section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D=1&section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D=Hi&section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D=1&section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D=Hello&section%5B%5D%5Btitle%5D=Identity+management&section%5B%5D%5Btitle%5D=Brand+building&section%5B%5D%5Btitle%5D=Recognition&section%5B%5D%5Btitle%5D=Your+views+on+change&section%5B%5D%5Btitle%5D=Developing+a+new+identity"; echo var_dump(preg_split('/[&=]/', $s));
Output for 4.3.0 - 7.1.0
array(48) { [0]=> string(2) "id" [1]=> string(1) "1" [2]=> string(6) "action" [3]=> string(4) "save" [4]=> string(5) "title" [5]=> string(18) "Corporate+Identity" [6]=> string(5) "short" [7]=> string(8) "identity" [8]=> string(6) "colour" [9]=> string(9) "%23ff751a" [10]=> string(10) "categoryID" [11]=> string(1) "1" [12]=> string(7) "bookURL" [13]=> string(48) "%2Ffiles%2Fbooks%2Fart_of_corporate_identity.pdf" [14]=> string(9) "bookImage" [15]=> string(49) "%2Ffiles%2Fimages%2Farticle-thumbs%2Fidentity.png" [16]=> string(5) "intro" [17]=> string(50) "%3Cp%3E%3Cbr+data-mce-bogus%3D%221%22%3E%3C%2Fp%3E" [18]=> string(24) "section%5B%5D%5Btitle%5D" [19]=> string(21) "Your+current+identity" [20]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D" [21]=> string(1) "5" [22]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D" [23]=> string(23) "What's+going+on+here%3F" [24]=> string(51) "section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D" [25]=> string(16) "This+is+option+1" [26]=> string(51) "section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D" [27]=> string(9) "Option+2!" [28]=> string(51) "section%5B%5D%5Bquestion%5D%5B%5D%5Boption%5D%5B%5D" [29]=> string(13) "And+number+3!" [30]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D" [31]=> string(1) "1" [32]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D" [33]=> string(2) "Hi" [34]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btype%5D" [35]=> string(1) "1" [36]=> string(43) "section%5B%5D%5Bquestion%5D%5B%5D%5Btext%5D" [37]=> string(5) "Hello" [38]=> string(24) "section%5B%5D%5Btitle%5D" [39]=> string(19) "Identity+management" [40]=> string(24) "section%5B%5D%5Btitle%5D" [41]=> string(14) "Brand+building" [42]=> string(24) "section%5B%5D%5Btitle%5D" [43]=> string(11) "Recognition" [44]=> string(24) "section%5B%5D%5Btitle%5D" [45]=> string(20) "Your+views+on+change" [46]=> string(24) "section%5B%5D%5Btitle%5D" [47]=> string(25) "Developing+a+new+identity" }