3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = 'a:4:{i:0;O:8:"stdClass":2:{s:3:"aaa";a:2:{i:0;s:5:"AAAAA";i:1;i:2;}s:3:"aaa";i:3;}i:2;i:4;i:3;i:5;s:3:"ccc";R:4;}'; $x = unserialize($data); //var_dump($x); //var_dump(is_string($x['ccc'])); var_dump(in_array($x['ccc'], array('test'))); //var_dump(is_string($x['ccc'])); var_dump(is_string($x['ccc']) && in_array($x['ccc'], array('test'))); if(is_string($x['ccc']) && in_array($x['ccc'], array('test'))) { $a = 'aaaaa'; $b = 'bbbbb'; $c = 'ccccc'; $d = 'ddddd'; $e = 'eeeee'; $f = 'fffff'; $g = 'ggggg'; var_dump($x['ccc']); echo 'haha'; } else { echo 'fuck'; }
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) bool(false) fuck

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