3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class induk { protected $alas=10; protected $miring=8; public function setAlas() { return ($this->alas/2); } public function setMiring() { return ($this->miring/2); } } $CP2 = new induk(); echo CP2->setAlas(); echo PHP_EOL; echo CP2->setMiring(); echo PHP_EOL ?>
based on AXqVO
Output for 5.6.38 - 7.3.0rc3
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR), expecting ',' or ';' in /in/5PZCp on line 19
Process exited with code 255.