3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'query' => 'hi', 'suggestions' => array ( 0 => 'history', 1 => 'hilton', 2 => 'hilton hhonors', 3 => 'hillary clinton', 4 => 'hickory farms', 5 => 'hip2save', 6 => 'hitler', 7 => 'hipaa', ), ); echo json_encode($array, JSON_PRETTY_PRINT) . "\n"; $array = array_values($array); echo json_encode($array, JSON_PRETTY_PRINT) . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
{ "query": "hi", "suggestions": [ "history", "hilton", "hilton hhonors", "hillary clinton", "hickory farms", "hip2save", "hitler", "hipaa" ] } [ "hi", [ "history", "hilton", "hilton hhonors", "hillary clinton", "hickory farms", "hip2save", "hitler", "hipaa" ] ]

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:
132.57 ms | 406 KiB | 5 Q