3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class StandardType { protected $context; public function __construct($context) { $this->context = $context; } public function __call($fn, ...$args) { $fn = static::getName() . "_$fn"; $args = array_merge([$this->context], $args[0]); return call_user_func_array($fn, $args); } protected abstract static function getName(); }
Output for 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Fatal error: Method StandardType::__call() must take exactly 2 arguments in /in/hKSsB on line 15
Process exited with code 255.
Output for 5.6.38
Strict Standards: Static function StandardType::getName() should not be abstract in /in/hKSsB on line 18

preferences:
173.4 ms | 1395 KiB | 44 Q