3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query1 = 'button_id798_number=798&button_id798_size=936&button_id798_price=0&button_id798_status=2&button_id799_number=799&button_id799_size=840&button_id799_price=0&button_id799_status=2&button_id800_number=800&button_id800_size=840&button_id800_price=329280'; $query2 = preg_replace('/_id(\d+)_(.+?)=/', '[$1][point_$2]=', $query1); parse_str($query2, $out); // better to be safe than sorry print '<pre>' ; var_dump($query2, $out['button']);
Output for git.master, git.master_jit, rfc.property-hooks
<pre>string(315) "button[798][point_number]=798&button[798][point_size]=936&button[798][point_price]=0&button[798][point_status]=2&button[799][point_number]=799&button[799][point_size]=840&button[799][point_price]=0&button[799][point_status]=2&button[800][point_number]=800&button[800][point_size]=840&button[800][point_price]=329280" array(3) { [798]=> array(4) { ["point_number"]=> string(3) "798" ["point_size"]=> string(3) "936" ["point_price"]=> string(1) "0" ["point_status"]=> string(1) "2" } [799]=> array(4) { ["point_number"]=> string(3) "799" ["point_size"]=> string(3) "840" ["point_price"]=> string(1) "0" ["point_status"]=> string(1) "2" } [800]=> array(3) { ["point_number"]=> string(3) "800" ["point_size"]=> string(3) "840" ["point_price"]=> string(6) "329280" } }

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:
38.91 ms | 403 KiB | 8 Q