3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $flags = array('utf-8,gzip,html,external'); $flags = explode(',', $flags); $flags = array_diff($flags, ['wikitext']); var_dump($flags); $flags = array_diff($flags, ['html']); var_dump($flags);
Output for 7.3.0rc3 - 7.3.0rc4
Warning: explode() expects parameter 2 to be string, array given in /in/Xs7VW on line 4 Warning: array_diff(): Expected parameter 1 to be an array, null given in /in/Xs7VW on line 5 NULL Warning: array_diff(): Expected parameter 1 to be an array, null given in /in/Xs7VW on line 7 NULL
Output for 5.4.0 - 7.3.0beta1
Warning: explode() expects parameter 2 to be string, array given in /in/Xs7VW on line 4 Warning: array_diff(): Argument #1 is not an array in /in/Xs7VW on line 5 NULL Warning: array_diff(): Argument #1 is not an array in /in/Xs7VW on line 7 NULL
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Xs7VW on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/Xs7VW on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Xs7VW on line 5
Process exited with code 255.