3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Card { private $rank; private $suit; public function __construct($rank, $suit) { $this->rank = $rank; $this->suit = $suit; } public function getRank() { return $this->rank; } } $xx = new Card(1, 'a'); echo 1; echo $xx.getRank(); ?>
based on CfnQo
Output for 7.0.0 - 7.2.0
1 Fatal error: Uncaught Error: Call to undefined function getRank() in /in/HSKRm:18 Stack trace: #0 {main} thrown in /in/HSKRm on line 18
Process exited with code 255.
Output for 5.3.21 - 5.6.28
1 Fatal error: Call to undefined function getRank() in /in/HSKRm on line 18
Process exited with code 255.