3v4l.org

run code in 500+ PHP versions simultaneously
<?php function stringifyRequestParamsRecursive(&$array) { foreach ($array as $k => &$v) { if ($k == 'multipart' && is_array($v)) { foreach ($v as $subk => &$subv) { if ( is_array($subv) && !empty($subv['name']) && !empty($subv['contents']) && is_resource($subv['contents']) ) { if ( get_resource_type($subv['contents']) === 'stream' && $metadata = stream_get_meta_data($subv['contents']) && !empty($metadata['uri']) ) { echo "Substituting\n"; $subv = '@ ' . $metadata['uri']; } } } } } } $a = ['multipart' => [['name' => 'foo', 'contents' => fopen('/tmp/aaaaaa', 'w')]]]; stringifyRequestParamsRecursive($a); echo json_encode($a, JSON_PRETTY_PRINT);
Output for git.master_jit, rfc.property-hooks, git.master

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:
42.47 ms | 2716 KiB | 4 Q