3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class test{ public function pub($_POST) { print_r($_POST); $this->priv(); } private function priv() { print_r($_POST); } } $arr = array('uri' => 'affirmative', 'k9' => 100); $newb = new test; $newb->pub($arr);
Output for hhvm-3.10.0 - 3.12.0
Array ( ) Array ( )
Output for 5.4.0 - 5.4.13
Fatal error: Cannot re-assign auto-global variable _POST in /in/0KvS9 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Array ( [uri] => affirmative [k9] => 100 ) Array ( [uri] => affirmative [k9] => 100 )