3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Modify { function mod($str) { return 'bar'; } } ob_start(array('Modify', 'mod')); echo 'foo';
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: ob_start(): non-static method Modify::mod() should not be called statically in /in/21acC on line 10 bar
Output for 4.3.0 - 5.1.1, hhvm-3.10.0 - 3.13.2
bar
Output for 5.3.0 - 5.3.29
Strict Standards: Non-static method Modify::mod() should not be called statically in /in/21acC on line 10 Strict Standards: Non-static method Modify::mod() should not be called statically in /in/21acC on line 10 bar
Output for 5.1.2 - 5.2.17
Strict Standards: Non-static method Modify::mod() cannot be called statically in /in/21acC on line 10 Strict Standards: Non-static method Modify::mod() cannot be called statically in /in/21acC on line 10 bar