3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(3,4); $b =& $a; $c =& $a; var_dump( is_same_ref( $a, $b )); $a[] = 5; $b[] = 6; var_dump( implode( $a ), implode( $b ), implode( $c )); function is_same_ref( & $a, & $b ){ // Save original values $ori_a = $a; $ori_b = $b; // Give them different values $a = 1; $b = 2; // Compare them, if they're equal, they are references to each other $eq = $a === $b; // Restore original values $a = $ori_a; $b = $ori_b; return $eq; }
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) string(4) "3456" string(4) "3456" string(4) "3456"

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:
30.26 ms | 401 KiB | 8 Q