3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Ancester { function __construct() { echo "An/Con\n"; } static function createFromFormat() { echo "An/cf\n"; } } class N extends Ancester { static function createFromFormat() { parent::createFromFormat(); echo "N/CF\n"; } } $f = N::createFromFormat();
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.23, 7.4.0 - 7.4.11, 8.0.0alpha1 - rc2
An/cf N/CF