3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Math { var 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 'pi' (T_STRING), expecting variable (T_VARIABLE) in /in/PYc57 on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/PYc57 on line 3
Process exited with code 255.