3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $prop = [1,2,3]; } class B{ public $someProp; } $a = new A; $b = new B; $b->someProp = $a->prop; mb_convert_variables('UTF-8', 'CP1252', $b); $a = new A; print_r($a); # example 2 class C { public $prop = ['string', 'string2']; } $c = new C; mb_convert_variables('UTF-8', 'CP1252', $c); $c = new C; print_r($c);

preferences:
53.11 ms | 402 KiB | 5 Q