3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Math { var const pi = 3.14; } class CircleMath extends Math { public static function calculateArea($radio) { return Math::pi * pow($radio, 2); } } $radio = 5; echo sprintf('El área del circulo con radio de longitud %s es: %s', $radio, CircleMath::calculateArea($radio)); ?>
Output for 5.4.0 - 5.4.21
Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /in/hMcAU on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_CONST, expecting T_VARIABLE in /in/hMcAU on line 3
Process exited with code 255.