3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = <<<X eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjoiMSIsInVzZXJJc0luY2x1ZGVkIjoiMSJ9 X; $x = json_decode(base64_decode($x), true); $x['chosenVariation'] = 0; var_dump(base64_encode(json_encode($x)));
based on NJ40c

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
string(112) "eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjowLCJ1c2VySXNJbmNsdWRlZCI6IjEifQ=="
Output for Arrow functions
string(112) "eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjowLCJ1c2VySXNJbmNsdWRlZCI6IjEifQ=="
Output for Object typehint
string(112) "eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjowLCJ1c2VySXNJbmNsdWRlZCI6IjEifQ=="
Output for Array change keys
string(112) "eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjowLCJ1c2VySXNJbmNsdWRlZCI6IjEifQ=="
Output for Lexical anon
string(112) "eyJleHBlcmltZW50SWQiOiJtanQwX3VSaVNQdXJOLXNBMThsclFRIiwiY2hvc2VuVmFyaWF0aW9uIjowLCJ1c2VySXNJbmNsdWRlZCI6IjEifQ=="

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