3v4l.org

run code in 300+ PHP versions simultaneously
<?php $htmls[] = <<<HTML DATA.tracking.user = { age: "19", name: "John doe", int: 55 } // This works HTML; $htmls[] = <<<HTML DATA.tracking.user = { age: "20", name: "Jane Doe", int: 49 } // This does not works HTML; foreach ($htmls as $html) { var_export(preg_match_all('~(?:\G(?!^),|DATA\.tracking\.user = \{)\s+([^:]+): (\d+|"[^"]*")~', $html, $out, PREG_SET_ORDER) ? $out : []); echo "\n --- \n"; }
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'DATA.tracking.user = { age: "19"', 1 => 'age', 2 => '"19"', ), 1 => array ( 0 => ', name: "John doe"', 1 => 'name', 2 => '"John doe"', ), 2 => array ( 0 => ', int: 55', 1 => 'int', 2 => '55', ), ) --- array ( 0 => array ( 0 => 'DATA.tracking.user = { age: "20"', 1 => 'age', 2 => '"20"', ), 1 => array ( 0 => ', name: "Jane Doe"', 1 => 'name', 2 => '"Jane Doe"', ), 2 => array ( 0 => ', int: 49', 1 => 'int', 2 => '49', ), ) ---

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:
68.61 ms | 407 KiB | 5 Q