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() { echo "CARALHO"; return $this->rank; } } $xx = new Card(1, 'a'); echo 1; echo $xx.getRank(); ?>
based on s1sN6
Output for 7.0.0 - 7.2.0
1 Fatal error: Uncaught Error: Call to undefined function getRank() in /in/hFW9M:19 Stack trace: #0 {main} thrown in /in/hFW9M on line 19
Process exited with code 255.
Output for 5.3.21 - 5.6.28
1 Fatal error: Call to undefined function getRank() in /in/hFW9M on line 19
Process exited with code 255.