3v4l.org

run code in 300+ PHP versions simultaneously
<?php # example 1 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);
Output for git.master, git.master_jit, rfc.property-hooks
A Object ( [prop] => Array ( [0] => 1 [1] => 2 [2] => 3 ) ) C Object ( [prop] => Array ( [0] => string [1] => string2 ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
47.51 ms | 401 KiB | 8 Q