3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $hola; public function setHola($name) { echo "I'm called"; $this->hola = $name; } } $a = new A; for($i=0; $i < 100000; $i++) { $a->setHola = 'test'; }
based on qvjuM
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.24, 7.4.0 - 7.4.12, 8.0.0