3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encodePost(array $post, $print=false){ $_post_string = array(); foreach($post as $key=>$value){ if(!is_array($value)){ $_post_string[] = $key."=".urlencode($value); }else{ foreach($value as $k=>$v){ $_post_string[] = $key."[]=".urlencode($v); } } } $_post_string = implode("&",$_post_string); if($print){ echo "<br/>".$_post_string."<br/>"; } return $_post_string; } $post = [ 'hash' => '62d417c8554711d322887588ed8ab3dd4636c8d5', 'product' => PROD_LITIGANT_ALERT_NAME, 'hits' => 20, 'rows' => 1000, 'billable_rows' => 850, 'errors' => [ '567 - Unknown zipcode [ignoring]', '23 - Invalid radius format [using default]', '150 - Data does not match header count, 1 extra columns [not searching]' ], 'submitted' => '2018-04-25 15:24:32', 'completed' => '2018-04-25 16:01:12' ]; encodePost($post, true);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "PROD_LITIGANT_ALERT_NAME" in /in/dfVBM:24 Stack trace: #0 {main} thrown in /in/dfVBM on line 24
Process exited with code 255.

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:
75.2 ms | 401 KiB | 8 Q