3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Drupal { } class Drupal1 { const CORE_COMPATIBILITY = 'Drupal1'; if (class_exists('Drupal') && defined('Drupal::CORE_COMPATIBILITY')) { echo Drupal::CORE_COMPATIBILITY; } if (class_exists('Drupal1') && defined('Drupal1::CORE_COMPATIBILITY')) { echo Drupal1::CORE_COMPATIBILITY; }
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected 'if' (T_IF), expecting function (T_FUNCTION) in /in/RrGdC on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in /in/RrGdC on line 8
Process exited with code 255.