3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sub_query(' SELECT md5(CONCAT( CAST(f.id_foto as CHAR), CAST(a.id_artista as CHAR) )) FROM letras.fotos f WHERE situacao = 1 AND id_artista = a.id_artista ORDER BY RAND() LIMIT 1 '); $letras = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','1'); foreach ($letras as $letra){ $condition = 'a.artista LIKE "' . $letra . '%"'; if ($letra === 'T') { $condition = $condition . ' AND a.artista NOT LIKE "The %"' } else { $condition = 'a.artista REGEXP "^d(.*)"'; } var_dump(' SELECT v.id_artista, @img := ( (' . $sub_query . ') ), CONCAT( INSERT( INSERT( INSERT( INSERT( SUBSTR(@img, 1, 4) , 2, 0,"/") , 4, 0, "/") , 6, 0, "/") , 8, 0, "/") , @img, "-tb.jpg") as img FROM views_artista_' . $this->language . ' AS v INNER JOIN letras.artistas AS a ON (v.id_artista = a.id_artista) WHERE ' . $condition . ' ORDER BY v.semanahits DESC LIMIT 20 '); }
Output for 5.3.0 - 5.5.3
Parse error: syntax error, unexpected '}' in /in/peIpU on line 19
Process exited with code 255.