3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Actions implements Action_Interface { protected $action_type; public function __construct() { $this->testing_stuff(); $this->testing_more_stuff(); } abstract protected function testing_more_stuff(); } interface Action_Interface { public function testing_stuff(); } class ThisAction extends Actions { protected $action_type = 'testing'; protected function testing_more_stuff() { echo "more stuff"; } private function testing_stuff() { echo "just some {$this->action_type} stuff\n"; } } $blah = new ThisAction;
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Access level to ThisAction::testing_stuff() must be public (as in class Action_Interface) in /in/kUDlc on line 27
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33
Fatal error: Access level to ThisAction::testing_stuff() must be public (as in class Action_Interface) in /in/kUDlc on line 20
Process exited with code 255.

preferences:
140.89 ms | 402 KiB | 169 Q