3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array_map(function ($a) { return json_encode($a); }, [ 'a' => 'b', 'c' => ['a' => 'b', 'c' => new DateTimeImmutable()], ]); var_dump($a);
Output for git.master
array(2) { ["a"]=> string(3) ""b"" ["c"]=> string(100) "{"a":"b","c":{"date":"2015-11-19 18:01:08.003810","timezone_type":3,"timezone":"Europe\/Amsterdam"}}" }
Output for git.master_jit
array(2) { ["a"]=> string(3) ""b"" ["c"]=> string(100) "{"a":"b","c":{"date":"2015-11-19 18:01:08.003773","timezone_type":3,"timezone":"Europe\/Amsterdam"}}" }
Output for rfc.property-hooks
array(2) { ["a"]=> string(3) ""b"" ["c"]=> string(100) "{"a":"b","c":{"date":"2015-11-19 18:01:08.003659","timezone_type":3,"timezone":"Europe\/Amsterdam"}}" }

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