3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'type' => 'quote', 'data' => [ 'name' => 'A quote name', 'quote' => 'A quote goes here (translatable)', ], ], [ 'type' => 'content', 'data' => [ 'content' => '<p>A content block goes here (translatable)</p>', ], ], [ 'type' => 'quote', 'data' => [ 'name' => 'A quote name (not translatable)', 'quote' => 'A quote goes here', ], ], [ 'type' => 'content', 'data' => [ 'content' => '<p>A content block goes here (translatable)</p>', ], ], ]; $payload = [ 'target_lang' => 'ES', 'text' => ['The post title'] ]; foreach ($array as ['type' => $t, 'data' => [$t => $payload['text'][]]]); var_export($payload);
Output for git.master_jit, git.master, rfc.property-hooks
array ( 'target_lang' => 'ES', 'text' => array ( 0 => 'The post title', 1 => 'A quote goes here (translatable)', 2 => '<p>A content block goes here (translatable)</p>', 3 => 'A quote goes here', 4 => '<p>A content block goes here (translatable)</p>', ), )

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.68 ms | 406 KiB | 5 Q