3v4l.org

run code in 200+ PHP versions simultaneously
<?php function serialize_block( $block ) { // Non-block content has no block name. if ( null === $block['blockName'] ) { return $block['innerHTML']; } $output = ''; // ... return $output; } $block = array( //'blockName' => 'test/void', 'attrs' => array(), 'innerBlocks' => array(), 'innerHTML' => '', 'innerContent' => array(), ); echo serialize_block( $block );
based on Wm3kb
Output for 7.1.25 - 7.3.6
Notice: Undefined index: blockName in /in/5Vjh3 on line 5