3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ABC { public static function recursion($information, $list) { self::$array = $information; self::$keylist = $list; } public static $array; private static $keylist; private static $asterisk = "**"; } $information = array("login" => "someUsername", "password" => "somePassword", "card_pin"=>"card_1234", "pin"=>"pin_356", "iin" => "iin_123", "shipping" => array("telephone" => array("value" => "telephone_998")), "cardnumber" => "card_number_876", "customer_id" => "customer_654", "telephone" => "someOtherTelephoneNumber555"); $list = "login,customer_id"; print_r($information); echo "\n\n"; ABC::recursion($information, $list); print_r(Recursion::$array);
based on nHYe4
Output for 7.0.0 - 7.2.0
Array ( [login] => someUsername [password] => somePassword [card_pin] => card_1234 [pin] => pin_356 [iin] => iin_123 [shipping] => Array ( [telephone] => Array ( [value] => telephone_998 ) ) [cardnumber] => card_number_876 [customer_id] => customer_654 [telephone] => someOtherTelephoneNumber555 ) Fatal error: Uncaught Error: Class 'Recursion' not found in /in/cEDL9:30 Stack trace: #0 {main} thrown in /in/cEDL9 on line 30
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Array ( [login] => someUsername [password] => somePassword [card_pin] => card_1234 [pin] => pin_356 [iin] => iin_123 [shipping] => Array ( [telephone] => Array ( [value] => telephone_998 ) ) [cardnumber] => card_number_876 [customer_id] => customer_654 [telephone] => someOtherTelephoneNumber555 ) Fatal error: Class 'Recursion' not found in /in/cEDL9 on line 30
Process exited with code 255.