3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $comentario = '/** * @var string * @Assert\NotBlank(message = "El nombre no puede estar vacĂ­o") * @Assert\Regex(pattern="/^ /", match = false, message="El nombre no puede empezar con espacios") * @Assert\Regex(pattern="/ $/", match = false, message="El nombre no puede terminar con espacios") */'; preg_match('/@Assert[\]\s+(.*)\n/m', $comentario, $assert); var_dump($assert);
based on jZQaX
Output for 5.2.0 - 7.1.0
Warning: preg_match(): Compilation failed: missing terminating ] for character class at offset 19 in /in/P6p2v on line 8 NULL
Output for 4.3.11 - 5.1.6
Warning: preg_match(): Compilation failed: missing terminating ] for character class at offset 19 in /in/P6p2v on line 8 array(0) { }
Output for 4.3.0 - 4.3.10
Warning: Compilation failed: missing terminating ] for character class at offset 19 in /in/P6p2v on line 8 array(0) { }