3v4l.org

run code in 300+ PHP versions simultaneously
<?php $getVars = [ "abc" => "[gravityform id=\"6\" title=\"false\" description=\"false\"]"; "xyz" => "[gravityform id=\"5\" title=\"false\" description=\"false\"]"; ]; function mde_shortcode_form(){ $formselect = $_GET['formselect']; if (!empty($formselect) && in_array($formselect,$getVars)) { do_shortcode($getVars[$formselect]); } } add_shortcode('abcde','mde_shortcode_form');
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.8
Parse error: syntax error, unexpected ';', expecting ']' in /in/6o0b1 on line 4
Process exited with code 255.

preferences:
173.9 ms | 1395 KiB | 37 Q