3v4l.org

run code in 500+ PHP versions simultaneously
<?php class questions { public function index( $from = null, $other_problem = '' ) { $this->myProperty = 'ss'; if ( $from != 'test' ) { return $this->test(); } return $other_problem; } public function test(){ function myfunc(){} return $this->index(__FUNCTION__, 'sth'); } } class tags extends questions { public function index ($from = null) { return parent::index($from); } } $obj = new tags; echo $obj->index();
Output for 8.5.0 - 8.5.3
Fatal error: Declaration of tags::index($from = null) must be compatible with questions::index($from = null, $other_problem = '') in /in/pIEr7 on line 25 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
Fatal error: Declaration of tags::index($from = null) must be compatible with questions::index($from = null, $other_problem = '') in /in/pIEr7 on line 25
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Warning: Declaration of tags::index($from = NULL) should be compatible with questions::index($from = NULL, $other_problem = '') in /in/pIEr7 on line 25
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Warning: Declaration of tags::index($from = NULL) should be compatible with questions::index($from = NULL, $other_problem = '') in /in/pIEr7 on line 29
Output for 5.6.0 - 5.6.40
Strict Standards: Declaration of tags::index() should be compatible with questions::index($from = NULL, $other_problem = '') in /in/pIEr7 on line 29

preferences:
112.3 ms | 1993 KiB | 4 Q