3v4l.org

run code in 300+ PHP versions simultaneously
<?php $layout = '+2-1+18*+7-21+3*-4-5+6x29'; sscanf( $layout, '%[-+x]%d%[-+x]%d%[-+x]%d*%[-+x]%d%[-+x]%d%[-+x]%d*%[-+x]%d%[-+x]%d%[-+x]%d', $column1[0][0], $column1[0][1], $column1[1][0], $column1[1][1], $column1[2][0], $column1[2][1], $column2[0][0], $column2[0][1], $column2[1][0], $column2[1][1], $column2[2][0], $column2[2][1], $column3[0][0], $column3[0][1], $column3[1][0], $column3[1][1], $column3[2][0], $column3[2][1] ); var_export($column1); echo "\n---\n"; var_export($column2); echo "\n---\n"; var_export($column3); /*foreach (explode('*', $layout) as $i => $column) { printf( "%d: %s\n", $i + 1, var_export( preg_match_all('~(\D)(\d+)~', $column, $matches) ? array_map(null, $matches[1], $matches[2]) : [], true ) ); }*/
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => '+', 1 => 2, ), 1 => array ( 0 => '-', 1 => 1, ), 2 => array ( 0 => '+', 1 => 18, ), ) --- array ( 0 => array ( 0 => '+', 1 => 7, ), 1 => array ( 0 => '-', 1 => 21, ), 2 => array ( 0 => '+', 1 => 3, ), ) --- array ( 0 => array ( 0 => '-', 1 => 4, ), 1 => array ( 0 => '-', 1 => 5, ), 2 => array ( 0 => '+', 1 => 6, ), )

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:
27.73 ms | 406 KiB | 5 Q