3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo "*** using correct value ***\n\n"; $Array = unserialize('a:2:{s:1:"a";i:1;s:1:"b";R:1;}'); echo "print_r():\n"; echo "----------\n"; print_r($Array); echo "\n"; $Array['b']['a'] = 2; echo "print_r():\n"; echo "----------\n"; print_r($Array); echo "\n";
Output for 7.0.0 - 7.1.0
*** using correct value *** print_r(): ---------- Array ( [a] => 1 [b] => Array *RECURSION* ) print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 2 [b] => Array *RECURSION* ) )
Output for hhvm-3.10.0 - 3.12.0
*** using correct value *** print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 1 [b] => Array *RECURSION* ) ) print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 2 [b] => Array ( [a] => 2 [b] => Array *RECURSION* ) ) )
Output for 5.6.8 - 5.6.28
*** using correct value *** print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 1 [b] => Array *RECURSION* ) ) print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 2 [b] => Array *RECURSION* ) )
Output for 5.1.0 - 5.5.35
*** using correct value *** print_r(): ---------- Array ( [a] => 1 [b] => Array *RECURSION* ) print_r(): ---------- Array ( [a] => 1 [b] => Array ( [a] => 2 [b] => Array ( [a] => 1 [b] => Array *RECURSION* ) ) )
Output for 4.3.0 - 5.0.5
*** using correct value *** print_r(): ---------- Array ( [a] => 1 [b] => Array *RECURSION* ) print_r(): ---------- Array ( [a] => 2 [b] => Array *RECURSION* )